Procházet zdrojové kódy

Fixed freeing a constant string (thanks @gnrlwart)

Sam Lantinga před 4 roky
rodič
revize
006aafabcf
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/joystick/windows/SDL_windows_gaming_input.c

+ 1 - 1
src/joystick/windows/SDL_windows_gaming_input.c

@@ -285,7 +285,7 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde
             __x_ABI_CWindows_CGaming_CInput_CIRawGameController2_Release(controller2);
         }
         if (!name) {
-            name = "";
+            name = SDL_strdup("");
         }
 
         hr = __x_ABI_CWindows_CGaming_CInput_CIRawGameController_QueryInterface(controller, &IID_IGameController, (void **)&gamecontroller);