diff src/regexp_nfa.c @ 12752:09c856605191 v8.0.1254

patch 8.0.1254: undefined left shift in gethexchrs() commit https://github.com/vim/vim/commit/4c22a91d20cce4f28dd2852a13129b5a4cc691da Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 2 22:29:38 2017 +0100 patch 8.0.1254: undefined left shift in gethexchrs() Problem: Undefined left shift in gethexchrs(). (geeknik) Solution: Use unsigned long. (idea by Christian Brabandt, closes https://github.com/vim/vim/issues/2255)
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Nov 2017 22:30:05 +0100
parents e769c912fcd9
children 307f2622826f
line wrap: on
line diff
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -1522,7 +1522,7 @@ nfa_regatom(void)
 		case 'u':   /* %uabcd hex 4 */
 		case 'U':   /* %U1234abcd hex 8 */
 		    {
-			int nr;
+			long nr;
 
 			switch (c)
 			{
@@ -2040,7 +2040,7 @@ nfa_regpiece(void)
     int		greedy = TRUE;      /* Braces are prefixed with '-' ? */
     parse_state_T old_state;
     parse_state_T new_state;
-    int		c2;
+    long	c2;
     int		old_post_pos;
     int		my_post_start;
     int		quest;