Menu

#54 Uppercase DMED file bug

open
nobody
DTED Driver (4)
5
2007-10-28
2007-10-28
Anonymous
No

Version: ogdi-3.2.0-0.5.beta1

In utils.c:

Need to re-terminate before adding DMED string.
See the "ADD THIS LINE:"

strncpy(ptr2,spriv->pathname,ptr1-(spriv->pathname));
ptr2[ptr1-(spriv->pathname)] = '\0';
strcat(ptr2,"dmed");
test = fopen(ptr2,"r");
if (test != NULL) {
fclose(test);
returnvalue = TRUE;
} else {
strncpy(ptr2,spriv->pathname,ptr1-(spriv->pathname));
ADD THIS LINE: ptr2[ptr1-(spriv->pathname)] = '\0';
strcat(ptr2,"DMED");
test = fopen(ptr2,"r");
if (test != NULL) {
fclose(test);
returnvalue = TRUE;
}
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB