View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000592 | file | General | public | 2024-12-18 21:24 | 2024-12-19 15:26 |
Reporter | ObjectsCountries | Assigned To | christos | ||
Priority | low | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | HEAD | ||||
Summary | 0000592: Issues with division | ||||
Description | Hello, I am trying to implement support for replays from the game Guilty Gear XX Accent Core Plus R. Bytes 0x77-0x7A of this file make up a lelong that represents the replay's timezone bias against GMT in seconds. However, this lelong is positive for timezones west of GMT and negative for timezones east of GMT, meaning that in order to get an accurate timezone, I have to divide by -3600. I've noticed two problems: 1. Dividing a negative number by a positive number results in a wildly inaccurate output (For example, -10800L/3600L becomes 1193043 instead of -3, and -10800L/2L becomes 2147478248 instead of -5400). 2. Diving any number by a negative number always results in 0. | ||||
Steps To Reproduce | Find an address in a file that represents a number, then try and divide it by a positive number. The result should be inaccurate. Try and divide it by a negative number, and the result should be 0. | ||||
Additional Information | The replay file format specification is here: https://steamcommunity.com/app/348550/discussions/0/3203746177244378016/ Attached are three files for testing: One from UTC0, one from UTC-4, and one from UTC+3. More replays can be found here: https://acpr.frameone.net/ Offline replays can be found by choosing "Player" and setting the player name to "localmatch". | ||||
Tags | bug | ||||
|
ggxxacpr-replay (1,470 bytes)
0 name ggxxacpr_datetime >0x1a uleshort x (%.4d- >0x1c ubyte x \b%.2d- >0x1d ubyte x \b%.2d >0x1e ubyte x \bT%.2d: >0x1f ubyte x \b%.2d: >0x20 ubyte x \b%.2d >0x77 lelong/-3600 =0 \bZ; # Can't use %+d for some reason # If I could, I would write: # >0x77 lelong/-3600 !=0 \b%+.2d # >>0x77 lelong%60 x \b:%.2d; >0x77 lelong/-3600 <0 \b%.2d >>0x77 lelong%60 x \b:%.2d; >0x77 lelong/-3600 >0 \b+%.2d >>0x77 lelong%60 x \b:%.2d; 0 name ggxxacpr_characters >0 ubyte =1 \bSol >0 ubyte =2 \bKy >0 ubyte =3 \bMay >0 ubyte =4 \bMillia >0 ubyte =5 \bAxl >0 ubyte =6 \bPotemkin >0 ubyte =7 \bChipp >0 ubyte =8 \bEddie >0 ubyte =9 \bBaiken >0 ubyte =10 \bFaust >0 ubyte =11 \bTestament >0 ubyte =12 \bJam >0 ubyte =13 \bAnji >0 ubyte =14 \bJohnny >0 ubyte =15 \bVenom >0 ubyte =16 \bDizzy >0 ubyte =17 \bSlayer >0 ubyte =18 \bI-No >0 ubyte =19 \bZappa >0 ubyte =20 \bBridget >0 ubyte =21 \bRobo-Ky >0 ubyte =22 \bA.B.A >0 ubyte =23 \bOrder-Sol >0 ubyte =24 \bKliff >0 ubyte =25 \bJustice 0 name ggxxacpr_players >0x52 string =\0 Offline Match; >>0x72 use ggxxacpr_characters >>0x72 ubyte x vs. >>0x73 use ggxxacpr_characters >>0x73 ubyte x \b) >0x52 string >\0 Online Match; >>0x32 string x %s ( >>0x72 use ggxxacpr_characters >>0x52 string >\0 \b) vs. %s ( >>0x73 use ggxxacpr_characters >>0x73 ubyte x \b)) 0 string GGR\x02Q\xad\xeewE\xd7H\xcd Guilty Gear XX Accent Core Plus R Replay !:ext ggr !:mime application/ggxxacpr-replay >0 use ggxxacpr_datetime >0 use ggxxacpr_players |
|
Fixed. The magic works now with: >0x77 lelong/-3600 !0 \b%+.2d >>0x77 lelong%60 x \b:%.2d; |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-12-18 21:24 | ObjectsCountries | New Issue | |
2024-12-18 21:24 | ObjectsCountries | Tag Attached: bug | |
2024-12-18 21:24 | ObjectsCountries | File Added: UTC_-4.ggr | |
2024-12-18 21:24 | ObjectsCountries | File Added: UTC_0.ggr | |
2024-12-18 21:24 | ObjectsCountries | File Added: UTC_+3.ggr | |
2024-12-18 21:24 | ObjectsCountries | File Added: ggxxacpr-replay | |
2024-12-19 15:25 | christos | Assigned To | => christos |
2024-12-19 15:25 | christos | Status | new => assigned |
2024-12-19 15:26 | christos | Status | assigned => resolved |
2024-12-19 15:26 | christos | Resolution | open => fixed |
2024-12-19 15:26 | christos | Fixed in Version | => HEAD |
2024-12-19 15:26 | christos | Note Added: 0004135 |