avoid another potential endless loop in reduce_scale()
avoid another potential endless loop in reduce_scale()

in case of "v==0", condition "(v/10)*10 == v" is (always) true, and thus
"while( (v/10)*10 == v ) { v /= 10; }" would run endlessly;
prevented by skipping the above loop in case of "v==0".

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb