Skip to content

Commit

Permalink
Fix length computation for resolving HTTP escape codes
Browse files Browse the repository at this point in the history
  • Loading branch information
d3x0r committed Jan 3, 2025
1 parent d9774b4 commit d480c62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/typelib/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ static PTEXT resolvePercents( PTEXT urlword ) {
//while( url = urlword )
{
char *_url = GetText(url);
char *start = _url;
TEXTRUNE ch;
char *newUrl = _url;
char *newUrl = start;
int decode = 0;
while( _url[0] ) {
if( decode ) {
Expand Down Expand Up @@ -332,7 +333,7 @@ static PTEXT resolvePercents( PTEXT urlword ) {
_url++;
}
newUrl[0] = _url[0];
SetTextSize( url, _url - GetText( url ) );
SetTextSize( url, newUrl - start );
urlword = NEXTLINE( url );
}
return url;
Expand Down

0 comments on commit d480c62

Please sign in to comment.