Skip to content

Commit a42a7c8

Browse files
gh-164: Make PRINT reject args that can't ~STR.
1 parent 4314721 commit a42a7c8

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/builtins.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5802,11 +5802,8 @@ static Value builtin_print(Interpreter* interp, Value* args, int argc, Expr** ar
58025802
case VAL_STR:
58035803
if (forward) printf("%s", args[i].as.s);
58045804
break;
5805-
case VAL_FUNC:
5806-
if (forward) printf("<func %p>", (void*)args[i].as.func);
5807-
break;
58085805
default:
5809-
if (forward) printf("<null>");
5806+
RUNTIME_ERROR(interp, "PRINT expects BOOL, INT, FLT, or STR argument", line, col);
58105807
break;
58115808
}
58125809
}

0 commit comments

Comments
 (0)