aboutsummaryrefslogtreecommitdiff
path: root/osc
diff options
context:
space:
mode:
Diffstat (limited to 'osc')
-rw-r--r--osc/unpackOSC.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/osc/unpackOSC.c b/osc/unpackOSC.c
index cc29265..45405a7 100644
--- a/osc/unpackOSC.c
+++ b/osc/unpackOSC.c
@@ -579,9 +579,10 @@ static int unpackOSC_IsNiceString(char *string, char *boundary)
return 0;
}
+ /* anything less than space (0x20) is no good, UTF-8 sequences will be accepted -- not strictly OSC v1.0 */
for (i = 0; string[i] != '\0'; i++)
- if ((!isprint(string[i])) || (string + i >= boundary)) return 0;
-
+ /* if ((!isprint(string[i])) || (string + i >= boundary)) return 0; */ /* only ASCII printable chars */
+ if ((0==(string[i]&0xE0)) || (string + i >= boundary)) return 0;
/* If we made it this far, it's a null-terminated sequence of printing characters
in the given boundary. Now we just make sure it's null padded... */