basecurve tool: fix stdout output
basecurve tool: fix a signed/unsigned comparison