mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Fix just |[scale] models not working. (Thanks 123DMWM)
This commit is contained in:
parent
b4b9c229bc
commit
8447c1fe0d
@ -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) {
|
bool String_UNSAFE_Separate(STRING_REF const String* str, char c, String* key, String* value) {
|
||||||
int idx = String_IndexOf(str, c, 0);
|
int idx = String_IndexOf(str, c, 0);
|
||||||
/* a) missing [c] or no key b) missing value */
|
if (idx == -1) {
|
||||||
if (idx <= 0 || (idx + 1) >= str->length) {
|
|
||||||
*key = *str;
|
*key = *str;
|
||||||
*value = String_Empty;
|
*value = String_Empty;
|
||||||
return false;
|
return false;
|
||||||
@ -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 */
|
/* Trim key [c] value to just key[c]value */
|
||||||
String_TrimEnd(key);
|
String_TrimEnd(key);
|
||||||
String_TrimStart(value);
|
String_TrimStart(value);
|
||||||
return true;
|
return key->length > 0 && value->length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user