mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +08:00
[c][cpp] Fix multi-page atlas parsing, closes #1935
This commit is contained in:
parent
d4c099018b
commit
8057c114db
@ -139,7 +139,10 @@ typedef struct SimpleString {
|
||||
static SimpleString *ss_trim(SimpleString *self) {
|
||||
while (isspace((unsigned char) *self->start) && self->start < self->end)
|
||||
self->start++;
|
||||
if (self->start == self->end) return self;
|
||||
if (self->start == self->end) {
|
||||
self->length = self->end - self->start;
|
||||
return self;
|
||||
}
|
||||
self->end--;
|
||||
while (((unsigned char) *self->end == '\r') && self->end >= self->start)
|
||||
self->end--;
|
||||
|
||||
@ -111,7 +111,10 @@ struct SimpleString {
|
||||
SimpleString trim() {
|
||||
while (isspace((unsigned char) *start) && start < end)
|
||||
start++;
|
||||
if (start == end) return *this;
|
||||
if (start == end) {
|
||||
length = end - start;
|
||||
return *this;
|
||||
}
|
||||
end--;
|
||||
while (((unsigned char) *end == '\r') && end >= start)
|
||||
end--;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user