mirror of
https://github.com/sheumann/DiskBrowser.git
synced 2024-11-21 22:31:13 +00:00
Fix issues resulting in memory trashing if over ~2500 entries were loaded.
This resulted from indexing off a pointer with signed int index values, which in some cases causes ORCA/C to generate code that only works within 32k bytes of the pointer base. The fix is to use unsigned index values, which results in indexing working correctly up to 64k bytes.
This commit is contained in:
parent
ef301fd7fc
commit
5ba69db3f2
@ -215,7 +215,7 @@ void UpdateControlState(void) {
|
||||
}
|
||||
|
||||
/* Only allow "Mount Disk" to be clicked if there is a disk selected */
|
||||
int currentSelection = NextMember2(0, (Handle)disksListHandle);
|
||||
unsigned currentSelection = NextMember2(0, (Handle)disksListHandle);
|
||||
if (currentSelection != 0) {
|
||||
if (diskList[currentSelection-1].memPtr == moreResultsString) {
|
||||
if (!moreResultsSelected) {
|
||||
|
@ -30,7 +30,7 @@
|
||||
static Rect diskListRect = {45, 10, 147, 386};
|
||||
|
||||
/* Current length in disk list */
|
||||
static int diskListLength = 0;
|
||||
static unsigned diskListLength = 0;
|
||||
|
||||
/* Number of current page of results from server */
|
||||
int pageNum;
|
||||
@ -50,7 +50,7 @@ void DoSearch(boolean getMore) {
|
||||
char *searchURL = NULL;
|
||||
enum NetDiskError result = 0;
|
||||
|
||||
int initialDiskListLength = diskListLength;
|
||||
unsigned initialDiskListLength = diskListLength;
|
||||
|
||||
WaitCursor();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user