diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-29 16:54:49 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-30 21:10:54 +0000 |
commit | 7e5158aa97b1708c22478435ae69e26ec5c7f6ce (patch) | |
tree | 490224750ec6348c602aff4a748cf14f388b095e /src | |
parent | Merge pull request #5486 (diff) | |
download | monero-7e5158aa97b1708c22478435ae69e26ec5c7f6ce.tar.xz |
mnemonics: fix 4 byte UTF-8 rewriting
Diffstat (limited to 'src')
-rw-r--r-- | src/mnemonics/language_base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mnemonics/language_base.h b/src/mnemonics/language_base.h index 653314b04..7d2599e9a 100644 --- a/src/mnemonics/language_base.h +++ b/src/mnemonics/language_base.h @@ -129,7 +129,7 @@ namespace Language case 1: *wptr++ = cp; break;
case 2: *wptr++ = 0xc0 | (cp >> 6); *wptr++ = 0x80 | (cp & 0x3f); break;
case 3: *wptr++ = 0xe0 | (cp >> 12); *wptr++ = 0x80 | ((cp >> 6) & 0x3f); *wptr++ = 0x80 | (cp & 0x3f); break;
- case 4: *wptr++ = 0xf0 | (cp >> 18); *wptr += 0x80 | ((cp >> 12) & 0x3f); *wptr++ = 0x80 | ((cp >> 6) & 0x3f); *wptr++ = 0x80 | (cp & 0x3f); break;
+ case 4: *wptr++ = 0xf0 | (cp >> 18); *wptr++ = 0x80 | ((cp >> 12) & 0x3f); *wptr++ = 0x80 | ((cp >> 6) & 0x3f); *wptr++ = 0x80 | (cp & 0x3f); break;
default: throw std::runtime_error("Invalid UTF-8");
}
*wptr = 0;
|