Skip to content
Snippets Groups Projects
Commit cae9c555 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix off-by-one in load/text.js TOTAL_TEXT value

i is incremented after reading the last entry, making this value
incorrect.
parent 581d79d4
Branches
Tags
No related merge requests found
Pipeline #8602 failed
...@@ -269,7 +269,7 @@ int main(int argc, char **argv) ...@@ -269,7 +269,7 @@ int main(int argc, char **argv)
fputs("#endif\n", text_h); fputs("#endif\n", text_h);
fclose(text_h); fclose(text_h);
fputs("\n", text_js); fputs("\n", text_js);
fprintf(text_js, "var TOTAL_TEXT=%d;\n", i); fprintf(text_js, "var TOTAL_TEXT=%d;\n", i - 1);
fprintf(text_js, "\nthis;\n"); fprintf(text_js, "\nthis;\n");
fclose(text_js); fclose(text_js);
fputs("};\n", text_defaults_c); fputs("};\n", text_defaults_c);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment