Skip to content

Commit

Permalink
Merge pull request vurtun#872 from moeinfinityx/patch-1
Browse files Browse the repository at this point in the history
Add type conversion for calloc
  • Loading branch information
dumblob authored Jul 10, 2019
2 parents 5fa99df + 15e4dae commit c3f6c73
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 c3f6c73

Please sign in to comment.