948f6b0 patch to guard against bad return numbers

Authored and Committed by Markus Neteler a year ago
    patch to guard against bad return numbers