sval: convert SHRT_MAX to s16max in the output