[Pkg-bitcoin-commits] [libunivalue] 10/76: univalue_read: make check more strict, fix test

Jonas Smedegaard dr at jones.dk
Mon Apr 4 09:18:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libunivalue.

commit 6b75a1f362a65aab9fe63d5447c9e2b3929c067e
Author: Jeff Garzik <jgarzik at bitpay.com>
Date:   Thu Jun 12 21:03:08 2014 -0400

    univalue_read: make check more strict, fix test
---
 univalue_read.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/univalue_read.cpp b/univalue_read.cpp
index 85ce5ee..dc805eb 100644
--- a/univalue_read.cpp
+++ b/univalue_read.cpp
@@ -103,7 +103,7 @@ enum tokentype getJsonToken(string& tokenVal, unsigned int& consumed,
         const char *firstDigit = first;
         if (!isdigit(*firstDigit))
             firstDigit++;
-        if (*firstDigit == '0')
+        if ((*firstDigit == '0') && isdigit(firstDigit[1]))
             return TOK_ERR;
 
         numStr += *raw;                       // copy first char

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/libunivalue.git



More information about the Pkg-bitcoin-commits mailing list