summaryrefslogtreecommitdiff
path: root/pom.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-21 23:41:00 -0400
committerpommicket <pommicket@gmail.com>2025-09-21 23:41:00 -0400
commite36a67d03647444efbe94b5379552fbac3e5c367 (patch)
treee666ba76cccf7f0bea38d54e8677fe41e4485a5d /pom.c
parent21fe5ab69d31a195d86bf86b9363351f347aa129 (diff)
Fix empty string being parsed as float
Diffstat (limited to 'pom.c')
-rw-r--r--pom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pom.c b/pom.c
index b41b9d4..e19c287 100644
--- a/pom.c
+++ b/pom.c
@@ -1689,6 +1689,7 @@ parse_int(const char *s, int64_t *val) {
static bool
parse_double(const char *s, double *val) {
bool can_have_dot = true;
+ if (*s == 0) return false;
for (const char *p = s; *p; p++) {
char c = *p;
if (c == '-' || c == '+') {