Skip to content

Commit ed155ae

Browse files
gh-63: Fix -source mode module name.
1 parent fc4aa9f commit ed155ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,9 @@ int main(int argc, char** argv) {
451451
char* source_label = NULL;
452452

453453
if (source_mode) {
454-
source_label = strdup("<source>");
454+
/* Per SPECIFICATION: when running with -source the primary
455+
program's module name should be "<string>" (not "<source>"). */
456+
source_label = strdup("<string>");
455457
src = strdup(source_text ? source_text : "");
456458
if (!source_label || !src) {
457459
free(source_label);

0 commit comments

Comments
 (0)