diff options
author | Tavian Barnes <tavianator@gmail.com> | 2012-02-06 10:11:22 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2012-02-06 10:11:22 -0500 |
commit | 22baedd972429c03c4c4d836a11f81f646ce0c92 (patch) | |
tree | cd90704829fe2484b582e010b73c642aad34a8cb /libdimension/canvas.c | |
parent | f658e4728c53b5a772b0fcd06bd2647e35e9d59c (diff) | |
download | dimension-22baedd972429c03c4c4d836a11f81f646ce0c92.tar.xz |
Add debugging tests for NaN values.
Diffstat (limited to 'libdimension/canvas.c')
-rw-r--r-- | libdimension/canvas.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libdimension/canvas.c b/libdimension/canvas.c index 2bcc502..8671402 100644 --- a/libdimension/canvas.c +++ b/libdimension/canvas.c @@ -72,6 +72,7 @@ dmnsn_canvas_set_pixel(dmnsn_canvas *canvas, size_t x, size_t y, { dmnsn_assert(x < canvas->width && y < canvas->height, "Canvas access out of bounds."); + dmnsn_assert(!dmnsn_tcolor_isnan(tcolor), "Pixel has NaN component."); /* Set the pixel */ canvas->pixels[y*canvas->width + x] = tcolor; |