Skip to content

Commit 62bb2db

Browse files
'go to <...> as <number>' parsing bug fixed
bugfix 12648 applied to 7.0
1 parent 2ecd3bd commit 62bb2db

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

engine/src/cmdss.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,10 @@ Parse_stat MCGo::parse(MCScriptPoint &sp)
184184
|| sp.lookup(SP_COMMAND, te) != PS_NORMAL
185185
|| te->type != TT_STATEMENT)
186186
{
187-
uint2 newmode;
188187
MCAutoNumberRef t_mode;
189188

190189
if (!MCNumberParse(sp.gettoken_stringref(), &t_mode)
191-
|| newmode < 1 || newmode >= WM_LAST)
190+
|| MCNumberFetchAsInteger(*t_mode) < 1 || MCNumberFetchAsInteger(*t_mode) >= WM_LAST)
192191
{
193192
MCperror->add
194193
(PE_GO_NOMODE, sp);

engine/src/dskw32.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3907,7 +3907,9 @@ struct MCWindowsDesktop: public MCSystemInterface, public MCWindowsSystemService
39073907
siStartInfo.hStdOutput = hChildStdoutWr;
39083908

39093909
MCStringRef t_cmd;
3910-
/* UNCHECKED */ MCStringFormat(t_cmd, "%@ /C %@", MCshellcmd, p_command);
3910+
// SN-2014-06-16 [[ Bug 12648 ]] Shell command does not accept spaces despite being quoted (Windows)
3911+
// Fix for 7
3912+
/* UNCHECKED */ MCStringFormat(t_cmd, "%@ /C \"%@\"", MCshellcmd, p_command);
39113913
MCAutoStringRefAsWString t_wcmd;
39123914
t_wcmd . Lock(t_cmd);
39133915
MCU_realloc((char **)&MCprocesses, MCnprocesses,

0 commit comments

Comments
 (0)