Commit 25aaf8b
committed
SafeFile: do endian-swap on float tag values
There are comments noting that writing raw float values may not be
endian-correct and indeed it is not. WX does not provide functions for
endian-swapping floats, but since amule explicitly uses exclusively
single-precision (32-bit) floats, just cast it into a uint32_t for the
swapping.
This is a no-op on little-endian.1 parent e26d06a commit 25aaf8b
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
| |||
306 | 311 | | |
307 | 312 | | |
308 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
309 | 318 | | |
310 | 319 | | |
311 | 320 | | |
| |||
0 commit comments