aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/regexp.c19
-rw-r--r--src/nvim/regexp_nfa.c4
2 files changed, 11 insertions, 12 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index be6c43493b..9bfc158763 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -1664,9 +1664,8 @@ static char_u *regpiece(int *flagp)
case Magic('@'):
{
int lop = END;
- int nr;
+ int64_t nr = getdecchrs();
- nr = getdecchrs();
switch (no_Magic(getchr())) {
case '=': lop = MATCH; break; /* \@= */
case '!': lop = NOMATCH; break; /* \@! */
@@ -2087,7 +2086,7 @@ static char_u *regatom(int *flagp)
case 'u': /* %uabcd hex 4 */
case 'U': /* %U1234abcd hex 8 */
{
- int i;
+ int64_t i;
switch (c) {
case 'd': i = getdecchrs(); break;
@@ -2976,9 +2975,9 @@ static void ungetchr(void)
* The parameter controls the maximum number of input characters. This will be
* 2 when reading a \%x20 sequence and 4 when reading a \%u20AC sequence.
*/
-static int gethexchrs(int maxinputlen)
+static int64_t gethexchrs(int maxinputlen)
{
- int nr = 0;
+ int64_t nr = 0;
int c;
int i;
@@ -3000,9 +2999,9 @@ static int gethexchrs(int maxinputlen)
* Get and return the value of the decimal string immediately after the
* current position. Return -1 for invalid. Consumes all digits.
*/
-static int getdecchrs(void)
+static int64_t getdecchrs(void)
{
- int nr = 0;
+ int64_t nr = 0;
int c;
int i;
@@ -3029,9 +3028,9 @@ static int getdecchrs(void)
* blahblah\%o210asdf
* before-^ ^-after
*/
-static int getoctchrs(void)
+static int64_t getoctchrs(void)
{
- int nr = 0;
+ int64_t nr = 0;
int c;
int i;
@@ -3055,7 +3054,7 @@ static int getoctchrs(void)
*/
static int coll_get_char(void)
{
- int nr = -1;
+ int64_t nr = -1;
switch (*regparse++) {
case 'd': nr = getdecchrs(); break;
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index dcd89d1470..ac811ec8f4 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -1409,7 +1409,7 @@ static int nfa_regatom(void)
case 'u': /* %uabcd hex 4 */
case 'U': /* %U1234abcd hex 8 */
{
- int nr;
+ int64_t nr;
switch (c) {
case 'd': nr = getdecchrs(); break;
@@ -1859,7 +1859,7 @@ static int nfa_regpiece(void)
int greedy = TRUE; /* Braces are prefixed with '-' ? */
parse_state_T old_state;
parse_state_T new_state;
- int c2;
+ int64_t c2;
int old_post_pos;
int my_post_start;
int quest;