1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-30 22:14:58 +03:00

Don't write the second argument of #OrigSource if it wasn't set.

(Or is zero.)
This commit is contained in:
Andrew Plotkin 2023-05-27 09:11:30 -04:00
parent 9e5a9af370
commit 65865563cd

View file

@ -190,7 +190,10 @@ void I6TargetCode::place_origsource(code_generator *gtr, code_generation *gen,
if (source_loc->textual_filename && Str::len(source_loc->textual_filename) > 0) {
WRITE("#OrigSource ");
Generators::compile_literal_text(gen, source_loc->textual_filename, TRUE);
WRITE(" %d;\n", source_loc->line_number);
if (source_loc->line_number > 0)
WRITE(" %d;\n", source_loc->line_number);
else
WRITE(";\n");
}
else {
WRITE("#OrigSource;\n");