source: trunk/third-party/b64-01-newline.patch

Last change on this file was 14474, checked in by mikedld, 3 years ago

Fix libb64 unsigned char issues while waiting for upstream to accept the patch

  • Property svn:eol-style set to native
File size: 878 bytes
  • src/cencode.c

    diff --git a/src/cencode.c b/src/cencode.c
    a b For details, see http://sourceforge.net/projects/libb64 
    77
    88#include <b64/cencode.h>
    99
     10/*
    1011const int CHARS_PER_LINE = 72;
     12*/
    1113
    1214void base64_init_encodestate(base64_encodestate* state_in)
    1315{
    int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, 
    7274                        result  = (fragment & 0x03f) >> 0;
    7375                        *codechar++ = base64_encode_value(result);
    7476                       
     77                        /*
    7578                        ++(state_in->stepcount);
    7679                        if (state_in->stepcount == CHARS_PER_LINE/4)
    7780                        {
    7881                                *codechar++ = '\n';
    7982                                state_in->stepcount = 0;
    8083                        }
     84                        */
    8185                }
    8286        }
    8387        /* control should not reach here */
    int base64_encode_blockend(char* code_out, base64_encodestate* state_in) 
    102106        case step_A:
    103107                break;
    104108        }
     109        /*
    105110        *codechar++ = '\n';
     111        */
    106112       
    107113        return codechar - code_out;
    108114}
Note: See TracBrowser for help on using the repository browser.