Skip to content

Commit e1a3253

Browse files
committed
Fix buffer append optimized out in release mode (#100)
1 parent e68eca2 commit e1a3253

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interbase.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,18 +1023,18 @@ int _php_ibase_attach_db(char **args, size_t *len, zend_long *largs, isc_db_hand
10231023
const char compat[] = "INT128 TO VARCHAR;DECFLOAT TO VARCHAR";
10241024
compat_buf = compat;
10251025
compat_buf_size = sizeof(compat) - 1;
1026+
dpb_len = slprintf(dpb, buf_len, "%c%c%s", isc_dpb_set_bind, compat_buf_size, compat_buf);
10261027
} else {
10271028
const char compat[] = "INT128 TO VARCHAR;DECFLOAT TO VARCHAR;TIME ZONE TO LEGACY";
10281029
compat_buf = compat;
10291030
compat_buf_size = sizeof(compat) - 1;
1031+
dpb_len = slprintf(dpb, buf_len, "%c%c%s", isc_dpb_set_bind, compat_buf_size, compat_buf);
10301032
}
10311033

1032-
dpb_len = slprintf(dpb, buf_len, "%c%c%s", isc_dpb_set_bind, compat_buf_size, compat_buf);
10331034
dpb += dpb_len;
10341035
buf_len -= dpb_len;
10351036
#endif
10361037

1037-
fbp_dump_buffer(sizeof(dpb_buffer), dpb_buffer); // TODO: debug, remove
10381038
if (isc_attach_database(IB_STATUS, (short)len[DB], args[DB], db, (short)(dpb-dpb_buffer), dpb_buffer)) {
10391039
_php_ibase_error();
10401040
return FAILURE;

0 commit comments

Comments
 (0)