diff --git a/IO/third_party/tga/targa.c b/IO/third_party/tga/targa.c index 36313e2..a4c66c9 100755 --- a/IO/third_party/tga/targa.c +++ b/IO/third_party/tga/targa.c @@ -254,7 +254,7 @@ int targa_loadFromFile(Targa *targa, char *filename) return rc; } -int targa_loadFromData(Targa *targa, unsigned char *data, int dataLength) +int targa_loadFromData(Targa *targa, const unsigned char *data, int dataLength) { short sNumber = 0; int ii = 0; @@ -268,7 +268,7 @@ int targa_loadFromData(Targa *targa, unsigned char *data, int dataLength) int rleId = 0; int pixel[4]; unsigned char *imageId = NULL; - unsigned char *ptr = NULL; + const unsigned char *ptr = NULL; if((targa == NULL) || (data == NULL) || (dataLength < 18)) { fprintf(stderr, "[%s():%i] error - invalid or missing argument(s).\n", diff --git a/IO/third_party/tga/targa.h b/IO/third_party/tga/targa.h index 5feed67..20da7a4 100755 --- a/IO/third_party/tga/targa.h +++ b/IO/third_party/tga/targa.h @@ -188,7 +188,7 @@ int targa_loadFromFile(Targa *targa, char *filename); * * @return An integer where zero is pass, less than zero is failure. */ -int targa_loadFromData(Targa *targa, unsigned char *data, int dataLength); +int targa_loadFromData(Targa *targa, const unsigned char *data, int dataLength); /**