fix: flip decrement/increment on comparison

- this prevents wrapping size_t below 0
This commit is contained in:
2026-10-13 21:11:20 +02:00
parent cfe3d40fc6
commit e9cf02e428

View File

@@ -484,7 +484,7 @@ int main(int argc, char** argv) {
fprintf(historyfile, "%s\n", line); fprintf(historyfile, "%s\n", line);
fflush(historyfile); fflush(historyfile);
while (tokenworkcapacity < linelen - 1) { while (tokenworkcapacity + 1 < linelen) {
tokenworkcapacity *= 2; tokenworkcapacity *= 2;
tokenwork = realloc(tokenwork, tokenworkcapacity); tokenwork = realloc(tokenwork, tokenworkcapacity);
} }