Fix error handling for dlls/wined3d/drawprim.c

Gerald Pfeifer gerald at pfeifer.com
Mon Dec 3 13:41:31 CST 2007


This really was broken: *regnum is assigned -1 at the beginning, but
is of unsigned type, so the error check never could trigger!

Gerald

ChangeLog:
Fix error handling in fixed_get_input().

Index: dlls/wined3d/drawprim.c
===================================================================
RCS file: /home/wine/wine/dlls/wined3d/drawprim.c,v
retrieving revision 1.208
diff -u -3 -p -r1.208 drawprim.c
--- dlls/wined3d/drawprim.c	14 Nov 2007 13:35:13 -0000	1.208
+++ dlls/wined3d/drawprim.c	3 Dec 2007 19:30:15 -0000
@@ -133,7 +133,7 @@ static BOOL fixed_get_input(
     else if (usage == WINED3DDECLUSAGE_SAMPLE && usage_idx == 0)
         *regnum = 14 + WINED3DDP_MAXTEXCOORD;
 
-    if (*regnum < 0) {
+    if (*regnum == -1) {
         FIXME("Unsupported input stream [usage=%s, usage_idx=%u]\n",
             debug_d3ddeclusage(usage), usage_idx);
         return FALSE;



More information about the wine-patches mailing list