mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[c] Closes #2397, buffer overflow when loading sequences with less than 10 frames.
This commit is contained in:
parent
3c1492ac32
commit
5989c861ca
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
static int /*bool*/ loadSequence(spAtlas *atlas, const char *basePath, spSequence *sequence) {
|
static int /*bool*/ loadSequence(spAtlas *atlas, const char *basePath, spSequence *sequence) {
|
||||||
spTextureRegionArray *regions = sequence->regions;
|
spTextureRegionArray *regions = sequence->regions;
|
||||||
char *path = CALLOC(char, strlen(basePath) + sequence->digits + 1);
|
char *path = CALLOC(char, strlen(basePath) + sequence->digits + 2);
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < regions->size; i++) {
|
for (i = 0; i < regions->size; i++) {
|
||||||
spSequence_getPath(sequence, basePath, i, path);
|
spSequence_getPath(sequence, basePath, i, path);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user