mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Don't count single quote ' as garbage (#1801)
Also copy the "blank space" (space or tab) vs "whitespace" (space, tab, or newline) convention from `<ctype.h>`
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <stack>
|
||||
#include <stdio.h>
|
||||
@@ -8,6 +7,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "helpers.hpp" // assume
|
||||
#include "util.hpp" // isBlankSpace
|
||||
|
||||
#include "asm/fixpoint.hpp"
|
||||
#include "asm/fstack.hpp"
|
||||
@@ -116,8 +116,8 @@ void opt_Parse(char const *s) {
|
||||
|
||||
case 'r': {
|
||||
++s; // Skip 'r'
|
||||
while (isblank(*s)) {
|
||||
++s; // Skip leading whitespace
|
||||
while (isBlankSpace(*s)) {
|
||||
++s; // Skip leading blank spaces
|
||||
}
|
||||
|
||||
if (s[0] == '\0') {
|
||||
|
||||
Reference in New Issue
Block a user