Skip to content

Commit 3b6ef36

Browse files
committed
Use strncasecmp rather than strncmp to check for default_
1 parent 346c167 commit 3b6ef36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mapfile.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -6907,7 +6907,7 @@ static void applyOutputFormatDefaultSubstitutions(outputFormatObj *format, const
69076907
char *tmpfilename = msStrdup(filename);
69086908
const char *default_key = msFirstKeyFromHashTable(table);
69096909
while(default_key) {
6910-
if(!strncmp(default_key,"default_",8)) {
6910+
if(!strncasecmp(default_key,"default_",8)) {
69116911
char *new_filename = NULL;
69126912
size_t buffer_size = (strlen(default_key)-5);
69136913
char *tag = (char *)msSmallMalloc(buffer_size);
@@ -6931,7 +6931,7 @@ static void applyClassDefaultSubstitutions(classObj *class, hashTableObj *table)
69316931
{
69326932
const char *default_key = msFirstKeyFromHashTable(table);
69336933
while(default_key) {
6934-
if(!strncmp(default_key,"default_",8)) {
6934+
if(!strncasecmp(default_key,"default_",8)) {
69356935
size_t buffer_size = (strlen(default_key)-5);
69366936
char *tag = (char *)msSmallMalloc(buffer_size);
69376937
snprintf(tag, buffer_size, "%%%s%%", &(default_key[8]));
@@ -6950,7 +6950,7 @@ static void applyLayerDefaultSubstitutions(layerObj *layer, hashTableObj *table)
69506950
int i;
69516951
const char *default_key = msFirstKeyFromHashTable(table);
69526952
while(default_key) {
6953-
if(!strncmp(default_key,"default_",8)) {
6953+
if(!strncasecmp(default_key,"default_",8)) {
69546954
size_t buffer_size = (strlen(default_key)-5);
69556955
const char *to = msLookupHashTable(table, default_key);
69566956
char *tag = (char *)msSmallMalloc(buffer_size);
@@ -6971,7 +6971,7 @@ static void applyHashTableDefaultSubstitutions(hashTableObj *hashTab, hashTableO
69716971
{
69726972
const char *default_key = msFirstKeyFromHashTable(table);
69736973
while (default_key) {
6974-
if (!strncmp(default_key, "default_", 8)) {
6974+
if (!strncasecmp(default_key, "default_", 8)) {
69756975
size_t buffer_size = (strlen(default_key) - 5);
69766976
const char *to = msLookupHashTable(table, default_key);
69776977
char *tag = (char *)msSmallMalloc(buffer_size);

0 commit comments

Comments
 (0)