aboutsummaryrefslogtreecommitdiffstats
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/string.c b/src/string.c
index ecba3463..52fb4a91 100644
--- a/src/string.c
+++ b/src/string.c
@@ -5,6 +5,7 @@
#include "serd/serd.h"
+#include <assert.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
@@ -131,6 +132,8 @@ read_sign(const char** const sptr)
double
serd_strtod(const char* const str, char** const endptr)
{
+ assert(str);
+
double result = 0.0;
// Point s at the first non-whitespace character