Skip to content

Commit 73b69d0

Browse files
committed
run: Add missing start byte and size inputs
1 parent 790dd7f commit 73b69d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pwc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,12 +1243,12 @@ int main(int argc, char *argv[])
12431243
}
12441244
else if(strcmp(cmd,"run") == 0)
12451245
{
1246-
// run/executable_code,wait_or_bg/[arg1]/[arg2]/...
1246+
// run/executable_code,wait_or_bg,start_byte,size/[arg1]/[arg2]/...
12471247
if(cmd_argc == 0)
12481248
_error("Number of arguments must be at least 1",true,line+1,12,filename);
12491249
in_tmp=_getinputc(0,i,cmd_argc,raw);
1250-
if((in_tmp != 1) && (in_tmp != 2))
1251-
_error("Number of inputs in the first argument must be 1 or 2",true,line+1,13,filename);
1250+
if((in_tmp < 1) || (in_tmp > 4))
1251+
_error("Number of inputs in the first argument must be 1, 2, 3 or 4",true,line+1,13,filename);
12521252
fprintf(ow,"1A\n%d\n%d\n",cmd_argc,in_tmp);
12531253
for(in_i2=0;in_i2<in_tmp;in_i2++)
12541254
fprintf(ow,"%s\n",_getinput(0,in_i2,i,cmd_argc,raw));

0 commit comments

Comments
 (0)