diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-04-20 10:18:45 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-04-20 10:18:45 -0700 |
commit | 00b9c0f4b20f6eb714fa55eb00df326a6f74fd10 (patch) | |
tree | 09d89fa8f0111990b95860b440b0030a1eca29ae /src/script.h | |
parent | 3b9e6b7820bf2fa98c8c2ae296cbe5fb043f690f (diff) | |
parent | 8c8e8c2e931b26905112faffb12f527f3256f5dc (diff) | |
download | bitcoin-00b9c0f4b20f6eb714fa55eb00df326a6f74fd10.tar.xz |
Merge pull request #1122 from dlitz/unsigned-char-fix
Unsigned char fix & fix undefined phexdigits[255]
Diffstat (limited to 'src/script.h')
-rw-r--r-- | src/script.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script.h b/src/script.h index 524d08b3ec..1aac324f62 100644 --- a/src/script.h +++ b/src/script.h @@ -268,7 +268,8 @@ public: } - explicit CScript(char b) { operator<<(b); } + //explicit CScript(char b) is not portable. Use 'signed char' or 'unsigned char'. + explicit CScript(signed char b) { operator<<(b); } explicit CScript(short b) { operator<<(b); } explicit CScript(int b) { operator<<(b); } explicit CScript(long b) { operator<<(b); } @@ -285,7 +286,8 @@ public: explicit CScript(const std::vector<unsigned char>& b) { operator<<(b); } - CScript& operator<<(char b) { return push_int64(b); } + //CScript& operator<<(char b) is not portable. Use 'signed char' or 'unsigned char'. + CScript& operator<<(signed char b) { return push_int64(b); } CScript& operator<<(short b) { return push_int64(b); } CScript& operator<<(int b) { return push_int64(b); } CScript& operator<<(long b) { return push_int64(b); } |