From 7e39a5031d7157e992e29415ecb909a7f3874ed6 Mon Sep 17 00:00:00 2001 From: Mattias Gaertner Date: Sat, 10 Mar 2018 13:25:28 +0000 Subject: [PATCH] pastojs: check invalid -Jc value git-svn-id: trunk@38481 - --- packages/pastojs/src/pas2jscompiler.pp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/pastojs/src/pas2jscompiler.pp b/packages/pastojs/src/pas2jscompiler.pp index c222e49df4..a666277840 100644 --- a/packages/pastojs/src/pas2jscompiler.pp +++ b/packages/pastojs/src/pas2jscompiler.pp @@ -2525,7 +2525,17 @@ begin c:=p^; inc(p); case c of - 'c': FileCache.AllJSIntoMainJS:=p^<>'-'; + 'c': + begin + if p^='-' then + begin + FileCache.AllJSIntoMainJS:=false; + inc(p); + end else + FileCache.AllJSIntoMainJS:=true; + if p^<>#0 then + ParamFatal('invalid value "'+String(p)+'"'); + end; 'e': begin Identifier:=NormalizeEncoding(String(p));