mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 09:08:42 +08:00
[csharp] Minor bugfix of binary 3.8 version fallback reading logic.
This commit is contained in:
parent
8a6d1a95e9
commit
559af1159b
@ -1200,7 +1200,7 @@ namespace Spine {
|
||||
input.Position = initialPosition;
|
||||
return GetVersionStringOld3X();
|
||||
} catch (Exception e) {
|
||||
throw new ArgumentException("Stream does not contain a valid binary Skeleton Data.\n" + e, "input");
|
||||
throw new ArgumentException("Stream does not contain valid binary Skeleton Data.\n" + e, "input");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1212,13 +1212,13 @@ namespace Spine {
|
||||
|
||||
// Version.
|
||||
byteCount = ReadInt(true);
|
||||
if (byteCount > 1) {
|
||||
if (byteCount > 1 && byteCount <= 13) {
|
||||
byteCount--;
|
||||
var buffer = new byte[byteCount];
|
||||
ReadFully(buffer, 0, byteCount);
|
||||
return System.Text.Encoding.UTF8.GetString(buffer, 0, byteCount);
|
||||
}
|
||||
return null;
|
||||
throw new ArgumentException("Stream does not contain valid binary Skeleton Data.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user