Index: /branches/1.2/ChangeLog
===================================================================
--- /branches/1.2/ChangeLog	(revision 431)
+++ /branches/1.2/ChangeLog	(revision 432)
@@ -5,4 +5,5 @@
 == ChangeLog ==
  * #86: remove/edit variable in admin page
+ * fixed #109: fast inc/dec was trying to break ro protection
  * fixed #101, #105: Fixed compatibility issue for apache 1.x
  * fixed #94: Garbage collector disabled when xcache.cacher set to off
Index: /branches/1.2/xcache.c
===================================================================
--- /branches/1.2/xcache.c	(revision 431)
+++ /branches/1.2/xcache.c	(revision 432)
@@ -2002,4 +2002,5 @@
 				stored_var = stored_xce->data.var;
 				if (Z_TYPE_P(stored_var->value) == IS_LONG) {
+					zval *zv;
 					stored_xce->ctime = XG(request_time);
 					stored_xce->ttl   = xce.ttl;
@@ -2010,5 +2011,7 @@
 					value += (inc == 1 ? count : - count);
 					RETVAL_LONG(value);
-					Z_LVAL_P(stored_var->value) = value;
+
+					zv = (zval *) xce.cache->shm->handlers->to_readwrite(xce.cache->shm, (char *) stored_var->value);
+					Z_LVAL_P(zv) = value;
 					break; /* leave lock */
 				}
