aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index e689af0c82..02d4baaaef 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1862,6 +1862,9 @@ void vim_str2nr(char_u *start, int *prep, int *len,
}
} else if ((pre == 'X') || (pre == 'x') || dohex > 1) {
// hex
+ if (pre != 0) {
+ n += 2; // skip over "0x"
+ }
while (ascii_isxdigit(*ptr)) {
un = 16 * un + (unsigned long)hex2nr(*ptr);
ptr++;