add: a security on print: if no line print return err
This commit is contained in:
@ -1,4 +1,9 @@
|
||||
cmd_print(text, args)
|
||||
{
|
||||
if ([text + LOCATION_LENGTH] == 0)
|
||||
{
|
||||
putstr("Empty file\n");
|
||||
return 1;
|
||||
}
|
||||
putstr([[text + LOCATION_ARRAY] + [text + LOCATION_CURRENT_LINE]]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user