diff options
| author | 2022-10-16 18:03:28 +0200 | |
|---|---|---|
| committer | 2022-10-16 18:03:28 +0200 | |
| commit | d9a15b8af7da2bc27d4d55ee745242f5b4e39071 (patch) | |
| tree | f890fe2b2f0a327f08da31404fd267c675fac690 /xs.h | |
| parent | Use multipart/form-data for posts (on the way to supporting uploads). (diff) | |
| download | snac2-d9a15b8af7da2bc27d4d55ee745242f5b4e39071.tar.gz snac2-d9a15b8af7da2bc27d4d55ee745242f5b4e39071.tar.xz snac2-d9a15b8af7da2bc27d4d55ee745242f5b4e39071.zip | |
Attachments are now starting to get real.
Diffstat (limited to 'xs.h')
| -rw-r--r-- | xs.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -737,7 +737,7 @@ double xs_number_get(const char *v) | |||
| 737 | { | 737 | { |
| 738 | double f = 0.0; | 738 | double f = 0.0; |
| 739 | 739 | ||
| 740 | if (v[0] == XSTYPE_NUMBER) | 740 | if (v != NULL && v[0] == XSTYPE_NUMBER) |
| 741 | f = atof(&v[1]); | 741 | f = atof(&v[1]); |
| 742 | 742 | ||
| 743 | return f; | 743 | return f; |
| @@ -749,7 +749,7 @@ const char *xs_number_str(const char *v) | |||
| 749 | { | 749 | { |
| 750 | const char *p = NULL; | 750 | const char *p = NULL; |
| 751 | 751 | ||
| 752 | if (v[0] == XSTYPE_NUMBER) | 752 | if (v != NULL && v[0] == XSTYPE_NUMBER) |
| 753 | p = &v[1]; | 753 | p = &v[1]; |
| 754 | 754 | ||
| 755 | return p; | 755 | return p; |