Skip to content

Commit 5f555fb

Browse files
committed
Fixed bad format string
1 parent e9cb68d commit 5f555fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/ffi/ffi.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ type_specifier(zend_ffi_dcl *dcl):
221221
| {if (dcl->flags & ZEND_FFI_DCL_TYPE_SPECIFIERS) yy_error_sym("unexpected", sym);}
222222
"_Bool"
223223
{dcl->flags |= ZEND_FFI_DCL_BOOL;}
224-
| {if (dcl->flags & (ZEND_FFI_DCL_TYPE_SPECIFIERS-(ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG))) yy_error_sym("Unexpected '%s'", sym);}
224+
| {if (dcl->flags & (ZEND_FFI_DCL_TYPE_SPECIFIERS-(ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG))) yy_error_sym("unexpected", sym);}
225225
("_Complex"|"complex"|"__complex"|"__complex__")
226226
{dcl->flags |= ZEND_FFI_DCL_COMPLEX;}
227227
// | "_Atomic" "(" type_name ")" // TODO: not-implemented ???

ext/ffi/ffi_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,7 @@ static int parse_type_specifier(int sym, zend_ffi_dcl *dcl) {
22772277
case YY_COMPLEX:
22782278
case YY___COMPLEX:
22792279
case YY___COMPLEX__:
2280-
if (dcl->flags & (ZEND_FFI_DCL_TYPE_SPECIFIERS-(ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG))) yy_error_sym("Unexpected '%s'", sym);
2280+
if (dcl->flags & (ZEND_FFI_DCL_TYPE_SPECIFIERS-(ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG))) yy_error_sym("unexpected", sym);
22812281
sym = get_sym();
22822282
dcl->flags |= ZEND_FFI_DCL_COMPLEX;
22832283
break;

0 commit comments

Comments
 (0)