medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 152203c826a183639ea2a3dc1e7983cf291dc6f5
parent f86a4db541b7aa897f1a6b1b77bb63a4df4af3b0
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Oct  8 12:23:28 +0300

Assert arrays arent't being initialised with NULL

Diffstat:
array.h | 2++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/array.h b/array.h @@ -7,6 +7,7 @@ template< typename T > class array { public: array( T * memory, size_t size ) : n( size ) { + assert( memory != NULL ); elems = memory; } @@ -48,6 +49,7 @@ template< typename T > class array2d { public: array2d( T * memory, size_t width, size_t height ) : w( width ), h( height ) { + assert( memory != NULL ); elems = memory; }