Browse Source

SDL_PenModifyForWacomID: return zero as axis_flags upon failure.

Fixes uninitialized warning in testautomation_pen.c:
testautomation_pen.c:1512: warning: 'mask' may be used uninitialized in this function
Ozkan Sezer 1 year ago
parent
commit
08fac5b1b2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/events/SDL_pen.c

+ 1 - 0
src/events/SDL_pen.c

@@ -1058,6 +1058,7 @@ int SDL_PenModifyForWacomID(SDL_Pen *pen, Uint32 wacom_devicetype_id, Uint32 *ax
     }
     }
 
 
     if (!name) {
     if (!name) {
+        *axis_flags = 0;
         return SDL_FALSE;
         return SDL_FALSE;
     }
     }