[PATCH] Fix int vs long problems in parsing some options