Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11gl.c @ 1379:c0a74f199ecf
Use only safe string functions
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 19 Feb 2006 23:46:34 +0000 |
parents | 19418e4422cb |
children | d910939febfa |
comparison
equal
deleted
inserted
replaced
1378:dc0e13e7e1ae | 1379:c0a74f199ecf |
---|---|
412 } | 412 } |
413 | 413 |
414 this->gl_config.dll_handle = handle; | 414 this->gl_config.dll_handle = handle; |
415 this->gl_config.driver_loaded = 1; | 415 this->gl_config.driver_loaded = 1; |
416 if ( path ) { | 416 if ( path ) { |
417 SDL_strncpy(this->gl_config.driver_path, path, | 417 SDL_strlcpy(this->gl_config.driver_path, path, |
418 sizeof(this->gl_config.driver_path)-1); | 418 SDL_arraysize(this->gl_config.driver_path)); |
419 } else { | 419 } else { |
420 SDL_strcpy(this->gl_config.driver_path, ""); | 420 *this->gl_config.driver_path = '\0'; |
421 } | 421 } |
422 return 0; | 422 return 0; |
423 } | 423 } |
424 | 424 |
425 void *X11_GL_GetProcAddress(_THIS, const char* proc) | 425 void *X11_GL_GetProcAddress(_THIS, const char* proc) |