Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

shedskin

By: a guest on May 14th, 2011  |  syntax: Diff  |  size: 0.98 KB  |  hits: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/shedskin/lib/binascii.cpp b/shedskin/lib/binascii.cpp
  2. index d58374d..ca7948f 100644
  3. --- a/shedskin/lib/binascii.cpp
  4. +++ b/shedskin/lib/binascii.cpp
  5. @@ -130,9 +130,9 @@ str *a2b_uu(str *string) {
  6.      __ss_int bin_len = (*ascii_data++ - ' ') & 077;
  7.      str * binary = new str("",bin_len);
  8.      char * bin_data = &binary->unit[0];
  9. -    char this_ch,leftchar=0;
  10. +    unsigned char this_ch;
  11. +    __ss_int leftchar=0, leftbits=0;
  12.  
  13. -    __ss_int leftbits=0;
  14.      ascii_len--;
  15.      for( ; bin_len > 0 ; ascii_len--, ascii_data++ ) {
  16.          /* XXX is it really best to add NULs if there's no more data */
  17. @@ -199,8 +199,8 @@ str *b2a_uu(str *binary) {
  18.      str * ascii = new str("",ascii_len);
  19.      char * ascii_data = &ascii->unit[0];
  20.      char * ascii_start = ascii_data;
  21. -    char this_ch,leftchar=0;
  22. -    __ss_int leftbits=0;
  23. +    unsigned char this_ch;
  24. +    __ss_int leftchar=0, leftbits=0;
  25.  
  26.      /* Store the length */
  27.      *ascii_data++ = ' ' + (bin_len & 077);