com php-src: fixed the 'p' modifier when %p is used: main/spprintf.c

From: Date: Thu, 09 Jan 2014 03:17:38 +0000
Subject: com php-src: fixed the 'p' modifier when %p is used: main/spprintf.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-75555@lists.php.net to get a copy of this message
Commit: 8edaa10eab3943b86e28671cd6f3b0d2f2bea6e5 Author: Anatol Belski <ab@php.net> Thu, 9 Jan 2014 04:17:38 +0100 Parents: 47df90a765ab7e40aca3669b80b1d50096a8650b Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8edaa10eab3943b86e28671cd6f3b0d2f2bea6e5 Log: fixed the 'p' modifier when %p is used Changed paths: M main/spprintf.c Diff: diff --git a/main/spprintf.c b/main/spprintf.c index 490cbfb..4a6aa00 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -367,9 +367,15 @@ static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list ap) modifier = LM_SIZE_T; #endif break; - case 'p': - fmt++; - modifier = LM_PHP_INT_T; + case 'p': { + char __next = *(fmt+1); + if ('d' == __next || 'u' == __next || 'x' == __next || 'o' == __next) { + fmt++; + modifier = LM_PHP_INT_T; + } else { + modifier = LM_STD; + } + } break; case 'h': fmt++;

« previous php.cvs (#75555) next »