nethack4: patch for shopkeeper crash

This upstream patch works without building -O0.