From f4469fc53dbe593fe787061c5da4e1fee511246b Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Fri, 27 Jan 2023 07:03:36 +0000 Subject: [PATCH] Removed file extension guard --- repl/lib_runner.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/repl/lib_runner.c b/repl/lib_runner.c index f544c62..ee1c5ef 100644 --- a/repl/lib_runner.c +++ b/repl/lib_runner.c @@ -618,13 +618,6 @@ Toy_Literal Toy_getFilePathLiteral(Toy_Interpreter* interpreter, Toy_Literal* dr Toy_deleteRefString(path); Toy_deleteRefString(drivePath); - //check for file extensions - if (!(filePath[realLength - 5] == '.' && filePath[realLength - 4] == 't' && filePath[realLength - 3] == 'o' && filePath[realLength - 2] == 'y')) { - interpreter->errorOutput("Bad script file extension (expected .toy)\n"); //TODO: add a bytecode version too - TOY_FREE_ARRAY(char, filePath, realLength + 1); - return TOY_TO_NULL_LITERAL; - } - //check for break-out attempts for (int i = 0; i < realLength - 1; i++) { if (filePath[i] == '.' && filePath[i + 1] == '.') {