Browse Source

Fix another strdup

master
Macoy Madson 3 months ago
parent
commit
8fbf232c55
  1. 3
      src/SDL.cake

3
src/SDL.cake

@ -8,7 +8,7 @@
(c-preprocessor-define-constant SDL_MAIN_HANDLED 1)
(c-import "SDL.h" "SDL_syswm.h"))
(c-import "<stdio.h>" &with-decls "<stddef.h>" "<stdbool.h>")
(c-import "<stdio.h>" "<string.h>" &with-decls "<stddef.h>" "<stdbool.h>")
(register-module-license "SDL" s-sdl-license-string)
@ -155,6 +155,7 @@
(var device-name (addr (const char)) (SDL_GetAudioDeviceName i is-capture))
(when device-name
(fprintf stderr "\t[%d] %s\n" i device-name)
(declare-extern-function strdup (str (addr (const char)) &return (addr char)))
(set (at i (deref device-names-out)) (strdup device-name)))
(incr i))
(return num-devices))

Loading…
Cancel
Save