Navigation Menu

Skip to content

Commit

Permalink
Fix just |[scale] models not working. (Thanks 123DMWM)
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Nov 7, 2018
1 parent b4b9c22 commit 8447c1f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/String.c
Expand Up @@ -79,8 +79,7 @@ int String_UNSAFE_Split(STRING_REF const String* str, char c, String* subs, int

bool String_UNSAFE_Separate(STRING_REF const String* str, char c, String* key, String* value) {
int idx = String_IndexOf(str, c, 0);
/* a) missing [c] or no key b) missing value */
if (idx <= 0 || (idx + 1) >= str->length) {
if (idx == -1) {
*key = *str;
*value = String_Empty;
return false;
Expand All @@ -92,7 +91,7 @@ bool String_UNSAFE_Separate(STRING_REF const String* str, char c, String* key, S
/* Trim key [c] value to just key[c]value */
String_TrimEnd(key);
String_TrimStart(value);
return true;
return key->length > 0 && value->length > 0;
}


Expand Down

0 comments on commit 8447c1f

Please sign in to comment.