Skip to content

Commit 006ec3e

Browse files
committed
Fix MSVC C5101 errors
1 parent c0e1f29 commit 006ec3e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sapi/phpdbg/phpdbg_utils.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,15 @@ PHPDBG_API const char *phpdbg_get_prompt(void) /* {{{ */
318318
}
319319

320320
/* create cached prompt */
321+
321322
#if !defined(HAVE_LIBEDIT) || (defined(HAVE_LIBEDIT) && defined(RL_PROMPT_START_IGNORE) && defined(RL_PROMPT_END_IGNORE))
322-
if ((PHPDBG_G(flags) & PHPDBG_IS_COLOURED)) {
323-
ZEND_IGNORE_VALUE(asprintf(&PHPDBG_G(prompt)[1],
324323
# if defined(HAVE_LIBEDIT) && defined(RL_PROMPT_START_IGNORE) && defined(RL_PROMPT_END_IGNORE)
325-
"\1\033[%sm\2%s\1\033[0m\2 ",
324+
# define PHPDBG_PROMPT "\1\033[%sm\2%s\1\033[0m\2 "
326325
# else
327-
"\033[%sm%s\033[0m ",
326+
# define PHPDBG_PROMPT "\033[%sm%s\033[0m "
328327
# endif
328+
if ((PHPDBG_G(flags) & PHPDBG_IS_COLOURED)) {
329+
ZEND_IGNORE_VALUE(asprintf(&PHPDBG_G(prompt)[1], PHPDBG_PROMPT,
329330
PHPDBG_G(colors)[PHPDBG_COLOR_PROMPT]->code,
330331
PHPDBG_G(prompt)[0]));
331332
} else

0 commit comments

Comments
 (0)