branch | RCL_3 |
changeset 5 | 433cbbb6a04b |
parent 0 | 15bf7259bb7c |
3:d8a3531bc6b8 | 5:433cbbb6a04b |
---|---|
44 |
44 |
45 |
45 |
46 fseek (file, 0, SEEK_END); |
46 fseek (file, 0, SEEK_END); |
47 len = ftell (file); |
47 len = ftell (file); |
48 fseek(file, 0, SEEK_SET); |
48 fseek(file, 0, SEEK_SET); |
49 |
49 if (len<0) |
50 { |
|
51 fclose(file); |
|
52 return 0; |
|
53 } |
|
50 shaderdata = (char*)malloc(len+1); |
54 shaderdata = (char*)malloc(len+1); |
51 if (!shaderdata) |
55 if (!shaderdata) |
52 { |
56 { |
53 fclose(file); |
57 fclose(file); |
54 return 0; |
58 return 0; |