ext/phar: Use normal variable instead of macro

This commit is contained in:
Gina Peter Bnayard 2024-09-12 19:52:49 +02:00 committed by Gina Peter Banyard
parent ae9d8099c2
commit 1facbc385a

View file

@ -2180,9 +2180,9 @@ char *phar_fix_filepath(char *path, size_t *new_len, int use_cwd) /* {{{ */
ptr_length = ptr - tok;
last_time:
if (IS_DIRECTORY_UP(tok, ptr_length)) {
#define PREVIOUS newpath[newpath_len - 1]
const char previous = newpath[newpath_len - 1];
while (newpath_len > 1 && !IS_BACKSLASH(PREVIOUS)) {
while (newpath_len > 1 && !IS_BACKSLASH(previous)) {
newpath_len--;
}