Skip to content

Commit 3538c7f

Browse files
authored
Update decodequery.h
1 parent ea0039a commit 3538c7f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

decodequery.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,12 @@ static int parseEntity(const char *current,char **to,const char **from) {
473473
// decoded[j] = 0;
474474
// return decoded;
475475
// }
476-
size_t decodeHtmlEntities(char *dest,const char *src) {
477-
if(!src) src = dest;
478-
char *to = dest;
479-
const char *from = src;
476+
size_t decodeHtmlEntities(char *destination,const char *source) {
477+
if(!source) {
478+
source = destination;
479+
}
480+
char *to = destination;
481+
const char *from = source;
480482
for(const char *current;(current = strchr(from,38));) {//&
481483
memmove(to,from,(size_t)(current - from));
482484
to += current - from;
@@ -490,7 +492,7 @@ size_t decodeHtmlEntities(char *dest,const char *src) {
490492
memmove(to,from,remaining);
491493
to += remaining;
492494
*to = 0;
493-
return (size_t)(to - dest);
495+
return (size_t)(to - destination);
494496
}
495497
void decodeUrl(char *destination,const char *source) {
496498
char x,y;

0 commit comments

Comments
 (0)