diff options
| author | Wladimir J. van der Laan <[email protected]> | 2012-04-20 10:18:45 -0700 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2012-04-20 10:18:45 -0700 |
| commit | 00b9c0f4b20f6eb714fa55eb00df326a6f74fd10 (patch) | |
| tree | 09d89fa8f0111990b95860b440b0030a1eca29ae /src/script.h | |
| parent | Merge pull request #959 from rebroad/LoadBlockIndexKillable (diff) | |
| parent | Fix bugs on 'unsigned char' platforms. (diff) | |
| download | discoin-00b9c0f4b20f6eb714fa55eb00df326a6f74fd10.tar.xz discoin-00b9c0f4b20f6eb714fa55eb00df326a6f74fd10.zip | |
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 524d08b3e..1aac324f6 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); } |