When I run my program, I get this runtime error:

Windows has triggered a breakpoint in quarantine.exe.

This may be due to a corruption of the heap, which indicates a bug in quarantine.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while quarantine.exe has focus.

The output window may have more diagnostic information.

I've looked around, and it seems that the solution to most people when they get this error is to change to either "Multi Threaded Debug DLL" or "Multi Threaded Debug" but when I do this, it still gives me this error.

The code that it points me to is this:

realloc (m->verts, sizeof(mvertex_t)*(m->numverts+1));

When I look in the output window, it says this:

HEAP[quarantine.exe]: Invalid Address specified to RtlValidateHeap( 01330000, 01333A80 )
Windows has triggered a breakpoint in quarantine.exe.

How could I fix this problem?

When the breakpoint is triggered, m->numverts is 2, and mvertex_t is defined like this:

typedef struct {
	float x, y, z;
} mvertex_t;