fix bitmask
authorMichael Wallner <mike@php.net>
Tue, 16 Sep 2014 18:13:29 +0000 (20:13 +0200)
committerMichael Wallner <mike@php.net>
Tue, 16 Sep 2014 18:13:29 +0000 (20:13 +0200)
src/php_pqconn.c

index dedd1f4c4a41701e59ce6ed05a820dbd9eeb7a8f..3b920e77aeba9ec17e8cd50b67cc62e418cb71f5 100644 (file)
@@ -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);