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

@@ -35,6 +35,7 @@ All notable changes to this project will be documented in this file.
- [#2444] SVG importer - improper stroke width when using width/height with viewBox
- [#2444] SVG importer - stroke width not respecting transforms
- [#2415] AS3 direct editation - nested functions - prefer callstack variables over prototype chain
- AS3 - AIR float support incorrectly writes float values to output stream
## [22.0.2] - 2025-01-17
### Added

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);
}
/**