vim-patch:8.2.2309: 0o777 not recognized as octal

Problem:    0o777 not recognized as octal.
Solution:   Use vim_isodigit(). (Ken Takata, closes vim/vim#7633, closes vim/vim#7631)
c37b655443

:scriptversion is N/A.
This commit is contained in:
Sean Dewar
2021-06-03 02:45:36 +01:00
parent 90a4cf92d2
commit 26733dd488
2 changed files with 12 additions and 4 deletions

View File

@@ -169,6 +169,14 @@ static inline bool ascii_isbdigit(int c)
return (c == '0' || c == '1');
}
/// Checks if `c` is an octal digit, that is, 0-7.
///
/// @see {ascii_isdigit}
static inline bool ascii_isodigit(int c)
{
return (c >= '0' && c <= '7');
}
/// Checks if `c` is a white-space character, that is,
/// one of \f, \n, \r, \t, \v.
///