Fixed: AS3 - AIR float support incorrectly writes float values to output stream

This commit is contained in:
Jindra Petřík
2025-04-22 20:58:45 +02:00
parent b52b83fb15
commit 504ca6644c
2 changed files with 6 additions and 1 deletions

View File

@@ -248,7 +248,11 @@ public class ABCOutputStream extends OutputStream {
* @throws IOException On I/O error
*/
public void writeFloat(float value) throws IOException {
writeU16(Float.floatToIntBits(value));
int val = Float.floatToIntBits(value);
write(val & 0xFF);
write((val >> 8) & 0xFF);
write((val >> 16) & 0xFF);
write((val >> 24) & 0xFF);
}
/**