diff 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
line wrap: on
line diff
--- a/src/video/x11/SDL_x11gl.c	Sun Feb 19 23:38:57 2006 +0000
+++ b/src/video/x11/SDL_x11gl.c	Sun Feb 19 23:46:34 2006 +0000
@@ -414,10 +414,10 @@
 	this->gl_config.dll_handle = handle;
 	this->gl_config.driver_loaded = 1;
 	if ( path ) {
-		SDL_strncpy(this->gl_config.driver_path, path,
-			sizeof(this->gl_config.driver_path)-1);
+		SDL_strlcpy(this->gl_config.driver_path, path,
+			SDL_arraysize(this->gl_config.driver_path));
 	} else {
-		SDL_strcpy(this->gl_config.driver_path, "");
+		*this->gl_config.driver_path = '\0';
 	}
 	return 0;
 }