Ignore:
Timestamp:
Jan 6, 2018, 5:03:47 PM (21 months ago)
Author:
nmedfort
Message:

Bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/unicode_set.cpp

    r5755 r5821  
    847847        append_quad(lo_quad, quads, runs);
    848848    }
    849 
    850849    assert (length > 0);
    851850    --length;
     
    853852    // Now check if we need to write out any Full blocks between the lo and hi code points; adjust our position
    854853    // in the original quad to suit.
    855     if (hi_index) {
     854    if (hi_index) {       
    856855        // Add in any full runs between the lo and hi quads
    857856        append_run(Full, hi_index - 1, runs);
     
    867866        }
    868867        length -= hi_index;
     868
    869869        // Write out the hi_quad value
    870870        if (LLVM_UNLIKELY(type == Full)) {
    871871            append_run(Full, 1, runs);
    872         } else {
     872        } else {           
    873873            if (type == Mixed) {
    874                 assert ((qi + hi_index) < qi_end);
     874                const auto qi_begin = qi;
     875                assert ((qi + hi_index) <= qi_end);
    875876                qi += hi_index;
    876                 hi_quad |= *qi++;
     877                if (length) {
     878                    quads.append<const bitquad_t *>(qi_begin, qi);
     879                    assert (qi != qi_end);
     880                    hi_quad |= *qi++;
     881                }
    877882            }
    878883            append_quad(hi_quad, quads, runs);
Note: See TracChangeset for help on using the changeset viewer.