Changeset 85 for trunk/src/xmldecl.c


Ignore:
Timestamp:
Apr 2, 2008, 8:53:00 AM (11 years ago)
Author:
cameron
Message:

EncodingAction?: void return type; lgth calc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xmldecl.c

    r84 r85  
    7474
    7575template <CodeUnit_Base C>
    76 int XML_Decl_Parser<C>::EncodingAction(Model_Info * m, int start_pos, int end_pos) {
    77         m->encoding = (unsigned char *) malloc(end_pos-start_pos+1);
    78         memcpy(m->encoding, &x8data[start_pos-buffer_base_pos], end_pos - start_pos);
    79         m->encoding[end_pos - start_pos] = '\0';
     76void XML_Decl_Parser<C>::EncodingAction(Model_Info * m, int start_pos, int end_pos) {
     77        int encoding_lgth = end_pos-start_pos;
     78        m->encoding = (unsigned char *) malloc(encoding_lgth+1);
     79        memcpy(m->encoding, &x8data[start_pos-buffer_base_pos], encoding_lgth);
     80        m->encoding[encoding_lgth] = '\0';
    8081}
    8182//
Note: See TracChangeset for help on using the changeset viewer.