Changeset 172 for trunk/src/byteplex.c


Ignore:
Timestamp:
Jun 25, 2008, 5:04:25 PM (11 years ago)
Author:
cameron
Message:

UTF-16 charset validation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/byteplex.c

    r169 r172  
    318318                                          simd_const_8(0xFF));
    319319//              u16_FFFE_FFFF_accum = simd_or(u16_FFFE_FFFF_accum, u16_FFFE_FFFF);
    320                 if (bitblock_has_bit(simd_or(u16_surrogate_error, u16_FFFE_FFFF))) {
     320                u16_surrogate_error = simd_or(u16_surrogate_error, u16_FFFE_FFFF);
     321       
     322                if (bitblock_has_bit(u16_surrogate_error)) {
    321323                        CharSetValidationError("UTF-16 (relative position reported)",
    322                                                                         pk * PACKSIZE +
    323                                                                         count_forward_zeroes(simd_or(u16_surrogate_error, u16_FFFE_FFFF))/8);
    324                 }
    325         }
    326         if (bitblock_has_bit(hi_surrogate_pending)) {
    327                 CharSetValidationError("UTF-16", PACKSIZE * packs_in_buffer);
     324                                                pk * PACKSIZE + count_forward_zeroes(u16_surrogate_error)/8);
     325                }
    328326        }
    329327};
Note: See TracChangeset for help on using the changeset viewer.