# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1303021328 0 # Node ID 39ab47d103c32491d31bd3d0958955bbe0188ad1 # Parent 82f68adde8a0292f62f81d5c50211dad1b84554e Fix for invalid data being passed to dw_color_foreground_set() on the first line of the file. diff -r 82f68adde8a0 -r 39ab47d103c3 dwtest.c --- a/dwtest.c Sun Apr 17 03:34:18 2011 +0000 +++ b/dwtest.c Sun Apr 17 06:22:08 2011 +0000 @@ -283,7 +283,7 @@ fileline = i + row - 1; y = i*font_height; dw_color_background_set( 1 + (fileline % 15) ); - dw_color_foreground_set( fileline % 16 ); + dw_color_foreground_set( fileline < 0 ? DW_CLR_WHITE : fileline % 16 ); sprintf( buf, "%6.6d", i+row ); dw_draw_text( 0, text1pm, 0, y, buf); pLine = lp[i+row];