Allow N to take a negative argument (PR@2402)

This commit is contained in:
Scott Lahteine 2015-07-08 17:30:39 -07:00 committed by Richard Wackerbarth
parent 85b7cca4d0
commit 2e0da8abdc

View file

@ -5307,8 +5307,8 @@ void process_next_command() {
// - Bypass N[0-9][0-9]*[ ]*
// - Overwrite * with nul to mark the end
while (*current_command == ' ') ++current_command;
if (*current_command == 'N' && current_command[1] >= '0' && current_command[1] <= '9') {
current_command += 2; // skip N[0-9]
if (*current_command == 'N' && ((current_command[1] >= '0' && current_command[1] <= '9') || current_command[1] == '-')) {
current_command += 2; // skip N[-0-9]
while (*current_command >= '0' && *current_command <= '9') ++current_command; // skip [0-9]*
while (*current_command == ' ') ++current_command; // skip [ ]*
}