From d9a15b8af7da2bc27d4d55ee745242f5b4e39071 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 16 Oct 2022 18:03:28 +0200 Subject: Attachments are now starting to get real. --- xs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xs.h') diff --git a/xs.h b/xs.h index 45abfae..bffc0ee 100644 --- a/xs.h +++ b/xs.h @@ -737,7 +737,7 @@ double xs_number_get(const char *v) { double f = 0.0; - if (v[0] == XSTYPE_NUMBER) + if (v != NULL && v[0] == XSTYPE_NUMBER) f = atof(&v[1]); return f; @@ -749,7 +749,7 @@ const char *xs_number_str(const char *v) { const char *p = NULL; - if (v[0] == XSTYPE_NUMBER) + if (v != NULL && v[0] == XSTYPE_NUMBER) p = &v[1]; return p; -- cgit v1.2.3