aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.c
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-05-22 14:55:40 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-05-22 14:55:40 -0400
commit2137c5bec13fce85ffb3f4bc7726b7a959e16b60 (patch)
tree2209f5963982093b65dc055555a3fa7792a7b779 /src/lpm.c
parent9d2e02a6f7191036b3d6f1db8858ded619693b06 (diff)
downloadlite-xl-plugin-manager-2137c5bec13fce85ffb3f4bc7726b7a959e16b60.tar.gz
lite-xl-plugin-manager-2137c5bec13fce85ffb3f4bc7726b7a959e16b60.zip
Added in warning to let people know when stubs are mismatching versions.
Diffstat (limited to 'src/lpm.c')
-rw-r--r--src/lpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lpm.c b/src/lpm.c
index 163c7b0..17da4cc 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -115,7 +115,7 @@ static int lpm_hash(lua_State* L) {
unsigned char chunk[4096];
size_t bytes = fread(chunk, 1, sizeof(chunk), file);
mbedtls_sha256_update_ret(&hash_ctx, chunk, bytes);
- if (bytes < 4096)
+ if (bytes < sizeof(chunk))
break;
}
fclose(file);