Switch from colon separators to semicolon

As documented, oops
This commit is contained in:
ISSOtm
2022-04-10 18:04:36 +02:00
committed by Eldred Habert
parent 91071009a8
commit 32242e0ff2

View File

@@ -114,7 +114,7 @@ void parseInlinePalSpec(char const * const rawArg) {
// Skip whitespace, if any // Skip whitespace, if any
skipWhitespace(arg, n); skipWhitespace(arg, n);
// Skip comma/colon, or end // Skip comma/semicolon, or end
if (n == arg.length()) { if (n == arg.length()) {
break; break;
} }
@@ -124,11 +124,11 @@ void parseInlinePalSpec(char const * const rawArg) {
++nbColors; ++nbColors;
// A trailing comma may be followed by a colon // A trailing comma may be followed by a semicolon
skipWhitespace(arg, n); skipWhitespace(arg, n);
if (n == arg.length()) { if (n == arg.length()) {
break; break;
} else if (arg[n] != ':') { } else if (arg[n] != ';') {
if (nbColors == 4) { if (nbColors == 4) {
parseError(n, 1, "Each palette can only contain up to 4 colors"); parseError(n, 1, "Each palette can only contain up to 4 colors");
return; return;
@@ -137,7 +137,7 @@ void parseInlinePalSpec(char const * const rawArg) {
} }
[[fallthrough]]; [[fallthrough]];
case ':': case ';':
++n; ++n;
skipWhitespace(arg, n); skipWhitespace(arg, n);
@@ -149,11 +149,11 @@ void parseInlinePalSpec(char const * const rawArg) {
break; break;
default: default:
parseError(n, 1, "Unexpected character, expected ',', ':', or end of argument"); parseError(n, 1, "Unexpected character, expected ',', ';', or end of argument");
return; return;
} }
// Check again to allow trailing a comma/colon // Check again to allow trailing a comma/semicolon
if (n == arg.length()) { if (n == arg.length()) {
break; break;
} }