Skip to content

Commit

Permalink
Add type conversion for calloc
Browse files Browse the repository at this point in the history
  • Loading branch information
moeinfinityx authored Jul 10, 2019
1 parent 5fa99df commit 15e4dae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/glfw_opengl4/nuklear_glfw_gl4.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ nk_glfw3_device_create()
GLint len = 0;
glGetShaderiv(dev->vert_shdr, GL_INFO_LOG_LENGTH, &len);
if (len > 1) {
char *log = calloc((size_t)len, sizeof(char));
char *log = (char*)calloc((size_t)len, sizeof(char));
glGetShaderInfoLog(dev->vert_shdr, len, NULL, log);
fprintf(stdout, "[GL]: failed to compile shader: %s", log);
free(log);
}

glGetShaderiv(dev->frag_shdr, GL_INFO_LOG_LENGTH, &len);
if (len > 1) {
char *log = calloc((size_t)len, sizeof(char));
char *log = (char*)calloc((size_t)len, sizeof(char));
glGetShaderInfoLog(dev->frag_shdr, len, NULL, log);
fprintf(stdout, "[GL]: failed to compile shader: %s", log);
free(log);
Expand Down

0 comments on commit 15e4dae

Please sign in to comment.