ref: 7909244275ef5d8e4c68e6024a81cfa8be81e861
parent: b5518b925c5d0c5d7d5bc7c7e8c1c777025600a9
author: aiju <devnull@localhost>
date: Sat Aug 27 21:08:26 EDT 2016
strtomp: update the returned char* even if there were no characters parsed
--- a/sys/src/libmp/port/strtomp.c
+++ b/sys/src/libmp/port/strtomp.c
@@ -240,12 +240,12 @@
return nil;
}
+ if(pp != nil)
+ *pp = e;
+
// if no characters parsed, there wasn't a number to convert
if(e == a)
return nil;
-
- if(pp != nil)
- *pp = e;
b->sign = sign;
return mpnorm(b);
--
⑨