ref: 5a0f347208b53e2ce955dbae91666fd51a8c0c6a
parent: 790909d2ea022425942407b3b2d2688f5d529795
author: Simon Howard <fraggle@gmail.com>
date: Sat Mar 25 16:47:13 EST 2006
Improve Z_CheckHeap() Subversion-branch: /trunk/chocolate-doom Subversion-revision: 443
--- a/src/z_native.c
+++ b/src/z_native.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: z_native.c 439 2006-03-24 21:20:36Z fraggle $
+// $Id: z_native.c 443 2006-03-25 21:47:13Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2006 Simon Howard
@@ -30,7 +30,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: z_native.c 439 2006-03-24 21:20:36Z fraggle $";
+rcsid[] = "$Id: z_native.c 443 2006-03-25 21:47:13Z fraggle $";
#include <stdlib.h>
@@ -304,14 +304,14 @@
for (block=allocated_blocks[i]; block != NULL; block = block->next)
{
- if (block->prev != prev)
+ if (block->id != ZONEID)
{
- I_Error("Z_CheckHeap: Doubly-linked list corrupted!");
+ I_Error("Z_CheckHeap: Block without a ZONEID!");
}
- if (block->id != ZONEID)
+ if (block->prev != prev)
{
- I_Error("Z_CheckHeap: Block without a ZONEID!");
+ I_Error("Z_CheckHeap: Doubly-linked list corrupted!");
}
prev = block;