Mercurial > sdl-ios-xcode
diff src/video/uikit/SDL_uikitappdelegate.m @ 4661:03dcb795c583
Merged changes from the main SDL codebase
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 12 Jul 2010 21:09:23 -0700 |
parents | 2bb1bfeee9e2 |
children | 7b7da52e8775 |
line wrap: on
line diff
--- a/src/video/uikit/SDL_uikitappdelegate.m Mon Jul 12 22:03:25 2010 -0400 +++ b/src/video/uikit/SDL_uikitappdelegate.m Mon Jul 12 21:09:23 2010 -0700 @@ -42,11 +42,12 @@ /* store arguments */ forward_argc = argc; - forward_argv = (char **)malloc(argc * sizeof(char *)); + forward_argv = (char **)malloc((argc+1) * sizeof(char *)); for (i=0; i<argc; i++) { forward_argv[i] = malloc( (strlen(argv[i])+1) * sizeof(char)); strcpy(forward_argv[i], argv[i]); } + forward_argv[i] = NULL; /* Give over control to run loop, SDLUIKitDelegate will handle most things from here */ UIApplicationMain(argc, argv, NULL, @"SDLUIKitDelegate");