Explorar el Código

`LoadText()` tweak (#1113)

Guarantee string is zero-terminated
pull/1118/head
brankoku hace 5 años
cometido por GitHub
padre
commit
572969d8b7
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. +3
    -1
      src/rlgl.h

+ 3
- 1
src/rlgl.h Ver fichero

@ -3013,8 +3013,10 @@ char *LoadText(const char *fileName)
if (count < size)
{
text = RL_REALLOC(text, count + 1);
text[count] = '\0';
}
// zero-terminate the string
text[count] = '\0';
}
fclose(textFile);

Cargando…
Cancelar
Guardar