my code keeps throwing a segmentation fault from internal c libraries, my code is the following:
        char *vertexShaderCode = (char *)calloc(1024, sizeof(char));
        FILE *shaderFile;
        shaderFile = fopen("./shaders/vertex.glsl", "r");
        if(shaderFile)
        {
            //TODO: load file
            for (char *line; !feof(shaderFile);)
            {
                fgets(line, 1024, shaderFile);
                strcat(vertexShaderCode, line);
            }
it is meant to load all the data from a file as a c string, line by line. can anyone help?
 
    