From 7e4e6bb2b9271d6e1e24c0bda82a9450d2a5b09f Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 16 Sep 2014 20:13:29 +0200 Subject: [PATCH] fix bitmask --- src/php_pqconn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/php_pqconn.c b/src/php_pqconn.c index dedd1f4..3b920e7 100644 --- a/src/php_pqconn.c +++ b/src/php_pqconn.c @@ -372,7 +372,7 @@ static void php_pqconn_object_write_def_fetch_type(zval *object, void *o, zval * } } - obj->intern->default_fetch_type = Z_LVAL_P(zft) & 0x2; /* two bits only */ + obj->intern->default_fetch_type = Z_LVAL_P(zft) & 0x3; /* two bits only */ if (zft != value) { zval_ptr_dtor(&zft); @@ -402,7 +402,7 @@ static void php_pqconn_object_write_def_txn_isolation(zval *object, void *o, zva } } - obj->intern->default_txn_isolation = Z_LVAL_P(zti) & 0x2; /* two bits only */ + obj->intern->default_txn_isolation = Z_LVAL_P(zti) & 0x3; /* two bits only */ if (zti != value) { zval_ptr_dtor(&zti); -- 2.30.2