Skip to content
Permalink
Browse files
Use strncasecmp rather than strncmp to check for default_
  • Loading branch information
geographika committed Oct 12, 2019
1 parent 346c167 commit 3b6ef36617a08b0115e2186f6da92e768050344b
Showing 1 changed file with 4 additions and 4 deletions.
@@ -6907,7 +6907,7 @@ static void applyOutputFormatDefaultSubstitutions(outputFormatObj *format, const
char *tmpfilename = msStrdup(filename);
const char *default_key = msFirstKeyFromHashTable(table);
while(default_key) {
if(!strncmp(default_key,"default_",8)) {
if(!strncasecmp(default_key,"default_",8)) {
char *new_filename = NULL;
size_t buffer_size = (strlen(default_key)-5);
char *tag = (char *)msSmallMalloc(buffer_size);
@@ -6931,7 +6931,7 @@ static void applyClassDefaultSubstitutions(classObj *class, hashTableObj *table)
{
const char *default_key = msFirstKeyFromHashTable(table);
while(default_key) {
if(!strncmp(default_key,"default_",8)) {
if(!strncasecmp(default_key,"default_",8)) {
size_t buffer_size = (strlen(default_key)-5);
char *tag = (char *)msSmallMalloc(buffer_size);
snprintf(tag, buffer_size, "%%%s%%", &(default_key[8]));
@@ -6950,7 +6950,7 @@ static void applyLayerDefaultSubstitutions(layerObj *layer, hashTableObj *table)
int i;
const char *default_key = msFirstKeyFromHashTable(table);
while(default_key) {
if(!strncmp(default_key,"default_",8)) {
if(!strncasecmp(default_key,"default_",8)) {
size_t buffer_size = (strlen(default_key)-5);
const char *to = msLookupHashTable(table, default_key);
char *tag = (char *)msSmallMalloc(buffer_size);
@@ -6971,7 +6971,7 @@ static void applyHashTableDefaultSubstitutions(hashTableObj *hashTab, hashTableO
{
const char *default_key = msFirstKeyFromHashTable(table);
while (default_key) {
if (!strncmp(default_key, "default_", 8)) {
if (!strncasecmp(default_key, "default_", 8)) {
size_t buffer_size = (strlen(default_key) - 5);
const char *to = msLookupHashTable(table, default_key);
char *tag = (char *)msSmallMalloc(buffer_size);

0 comments on commit 3b6ef36

Please sign in to comment.