mirror of
https://github.com/fltk/fltk.git
synced 2025-12-10 21:18:47 +08:00
Replace all calls to sprintf() by calls to snprintf().
This commit is contained in:
@@ -68,7 +68,7 @@ public:
|
||||
gl_Position = vec4(p, 0.0, 0.0) + position;\
|
||||
}";
|
||||
char vss_string[300]; const char *vss = vss_string;
|
||||
sprintf(vss_string, vss_format, Mslv, mslv);
|
||||
snprintf(vss_string, 300, vss_format, Mslv, mslv);
|
||||
const char *fss_format="#version %d%d\n\
|
||||
in vec4 colourV;\
|
||||
out vec4 fragColour;\
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
fragColour = colourV;\
|
||||
}";
|
||||
char fss_string[200]; const char *fss = fss_string;
|
||||
sprintf(fss_string, fss_format, Mslv, mslv);
|
||||
snprintf(fss_string, 200, fss_format, Mslv, mslv);
|
||||
GLint err; GLchar CLOG[1000]; GLsizei length;
|
||||
vs = glCreateShader(GL_VERTEX_SHADER);
|
||||
glShaderSource(vs, 1, &vss, NULL);
|
||||
|
||||
Reference in New Issue
Block a user