-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
Description
This problem has been identified while fixing #11131 .
Description of the Issue
Some members (_line2go, _column2go and _pos2go) from the CmdLineParams & CmdLineParamsDTO structs (".\PowerEditor\src\Parameters.h") need int to intptr_t change to support 2GB+ files. Saving & loading of the 'session.xml' needs a 2GB+ adaptation too.
Steps to Reproduce the Issue
- Open 64-bit N++ (v8.3+).
- Load a 2GB+ file (I will use a file with exactly 2 GB = 2147483648 B as an example here).
- Make sure you have the 'Remember current session for next launch' checked in Settings -> Preferences... -> Backup.
- Scroll down & move cursor to the very end of this file (check that the 'Pos:' in the bottom status bar shows at least 2147483649).
- Close the opened N++.
- Go to a folder, where you have your 'session.xml' file stored (for portable N++ it will be the same folder, where is the main N++ executable 'notepad++.exe') and open that file.
- You will see the result of an
intinteger overflow - incorrect negative valuesendPos="-2147483648" startPos="-2147483648"
Expected Behavior
You see correct positive values `endPos="2147483648" startPos="2147483648"
Actual Behavior
After the saved N++ session is restored, the cursor is not at the end of the 2GB file, where it was left before.
@donho
I can do a PR for this if you agree with this proposal.
Reactions are currently unavailable