Tight control of inventory and expenses has helped discount retailer Stein Mart Inc swing to a second quarter profit, even though same-store sales continue to slide.