repo: uritools
action: commit
revision: 
path_from: 
revision_from: 0eb5608223ed83a35734c86a99c57def93a9cfca:
path_to: 
revision_to: 
git.thebackupbox.net
uritools
git clone git://git.thebackupbox.net/uritools
commit 0eb5608223ed83a35734c86a99c57def93a9cfca
Author: epoch 
Date:   Sun Jun 16 10:57:33 2019 -0500

    removed a unneeded memmove from uriunescape and a trailing space

diff --git a/uri.h b/uri.h
index aea3912e1d93464156c60a920adf87ead931afbb..
index ..dc049bceb0a2bdf93cfdef868c20682f97e5c3a8 100644
--- a/uri.h
+++ b/uri.h
@@ -61,7 +61,6 @@ int uriunescape(char *in,char *out) {
  char *t;
  char a,b;
  char *s=in;
- if(!strchr(s,'%')) memmove(out,in,strlen(in));
  while((t=strchr(s,'%'))) {
   if(t-s) {//if there are actually bytes to copy.
    memmove(o,s,t-s);
@@ -72,7 +71,7 @@ int uriunescape(char *in,char *out) {
    s+=3;//skip the %XX
    a=toupper(t[1]);
    b=toupper(t[2]);
-   *o=((a-'0'<10 ? a-'0' : a-'A'+10) << 4) + (b-'0'<10 ? b-'0' : b-'A'+10); 
+   *o=((a-'0'<10 ? a-'0' : a-'A'+10) << 4) + (b-'0'<10 ? b-'0' : b-'A'+10);
    o++;
   } else {
    s++;//skip just the %. the next character might be a % //TODO: look up what the "right" thing to do here is.

-----END OF PAGE-----