correctly deserialize negatives

This commit is contained in:
nickgkg
2020-07-16 13:03:41 -04:00
committed by Jindra Petřík
parent b20eeafe53
commit 01fee76d81

View File

@@ -675,12 +675,7 @@ public class SWFInputStream implements AutoCloseable {
public float readFIXED8(String name) throws IOException {
newDumpLevel(name, "FIXED8");
int afterPoint = readEx();
int beforePoint = readSI8Internal();
float ret;
if (beforePoint < 0) {
ret = beforePoint - ((float) afterPoint) / 256;
} else {
ret = beforePoint + ((float) afterPoint) / 256;
int beforePoint = readSI8Internal();
float ret = beforePoint + ((float) afterPoint) / 256;
endDumpLevel(ret);
return ret;