# HG changeset patch # User William Astle # Date 1655409334 21600 # Node ID 33a59e232a5b56fae7c0b9cd8a60c2cd5578f94c # Parent a584b9ddffc4ed4bd0baaba43defaefe6fb6a6c9 Fix basic output target to keep lines below 249 characters The line length limiter in the basic output was not properly moving to the next before 249 characters, which is the limit Color Basic can read in an ASCII basic program. Changed the line limiter to 240 from 247 to account for a possible 5 digit number plus a comma and just a bit of extra breathing space. diff -r a584b9ddffc4 -r 33a59e232a5b lwasm/output.c --- a/lwasm/output.c Sat May 14 21:30:59 2022 -0600 +++ b/lwasm/output.c Thu Jun 16 13:55:34 2022 -0600 @@ -121,7 +121,10 @@ int write_code_BASIC_fprintf(FILE *of, int linelength, int *linenumber, int value) { - if (linelength > 247) + // 240 should give enough room for a 5 digit value and a comma with a bit of extra + // space in case something unusual happens without going over the 249 character + // limit Color Basic has on input lines. + if (linelength > 240) { fprintf(of, "\n"); linelength = fprintf(of, "%d DATA ", *linenumber);