Backport: Really fix bug #11519, by fixing the last change in ralloc.c.
[bpt/emacs.git] / src / ralloc.c
index 2e4823d..b1a5982 100644 (file)
@@ -757,7 +757,7 @@ r_alloc_sbrk (long int size)
   if (! r_alloc_initialized)
     r_alloc_init ();
 
-  if (! use_relocatable_buffers)
+  if (use_relocatable_buffers <= 0)
     return (*real_morecore) (size);
 
   if (size == 0)
@@ -1204,12 +1204,12 @@ r_alloc_reset_variable (POINTER *old, POINTER *new)
 void
 r_alloc_inhibit_buffer_relocation (int inhibit)
 {
-  if (use_relocatable_buffers < 0)
-    use_relocatable_buffers = 0;
+  if (use_relocatable_buffers > 1)
+    use_relocatable_buffers = 1;
   if (inhibit)
-    use_relocatable_buffers++;
-  else if (use_relocatable_buffers > 0)
     use_relocatable_buffers--;
+  else if (use_relocatable_buffers < 1)
+    use_relocatable_buffers++;
 }
 
 \f