Ignore:
Timestamp:
Dec 15, 2017, 9:19:27 AM (15 months ago)
Author:
cameron
Message:

Small fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_name.h

    r5634 r5781  
    6060    }
    6161    inline const char * replicateString(const char * string, const length_t length) {
    62         if (string) {
     62        if (string && (length > 0)) {
    6363            char * allocated = reinterpret_cast<char*>(mAllocator.allocate(length));
    6464            std::memcpy(allocated, string, length);
    65             string = allocated;
     65            return allocated;
    6666        }
    67         return string;
     67        return nullptr;
    6868    }
    6969
Note: See TracChangeset for help on using the changeset viewer.