diff --git a/src/Core/Entities/PlayerEntity.m b/src/Core/Entities/PlayerEntity.m index 6c1d5d7c..5c60db65 100644 --- a/src/Core/Entities/PlayerEntity.m +++ b/src/Core/Entities/PlayerEntity.m @@ -1788,6 +1788,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market); [self setMissionBackgroundSpecial:nil]; [self setEquipScreenBackgroundDescriptor:nil]; marketOffset = 0; + DESTROY(marketSelectedCommodity); script_time = 0.0; script_time_check = SCRIPT_TIMER_INTERVAL; @@ -9991,7 +9992,11 @@ static NSString *last_outfitting_key=nil; if (goodsIndex <= marketOffset) { // is off top of list, move list upwards - marketOffset = goodsIndex-1; + if (goodsIndex == 0) { + marketOffset = 0; + } else { + marketOffset = goodsIndex-1; + } } else if (goodsIndex > marketOffset+(GUI_ROW_MARKET_END-GUI_ROW_MARKET_START)-2) { @@ -10005,7 +10010,6 @@ static NSString *last_outfitting_key=nil; } } - // GUI stuff { OOGUIRow start_row = GUI_ROW_MARKET_START;