Ignore:
Timestamp:
09/01/19 11:18:48 (5 years ago)
Author:
tbretz
Message:
Added a missing sanity check in the $ function, use dereferencing rather than string().c_str() for paths.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/InterpreterV8.cc

    r19456 r19582  
    750750    const auto f = path.is_absolute() ? path : boost::filesystem::path(fIncludePath)/path;
    751751
    752     izstream fin(f.string().c_str());
     752    izstream fin(*file);//f.string().c_str());
    753753    if (!fin)
    754754        return ThrowException(String::New(errno!=0?strerror(errno):"Insufficient memory for decompression"));
     
    789789    const auto f = path.is_absolute() ? path : boost::filesystem::path(fIncludePath)/path;
    790790
    791     izstream fin(f.string().c_str());
     791    izstream fin(*file);//f.string().c_str());
    792792    if (!fin)
    793793        return ThrowException(String::New(errno!=0?strerror(errno):"Insufficient memory for decompression"));
     
    26072607                "}"
    26082608                ""
    2609                 "val = typeof(val)=='object' ? JSON.stringify(val) : val.toString(base);"
     2609                "val = val==undefined || typeof(val)=='object' ? JSON.stringify(val) : val.toString(base);"
    26102610                ""
    26112611                "var sz = parseInt(p1); /* padding size */"
     
    28132813        else
    28142814        {
    2815             fIncludePath = boost::filesystem::path(filename).parent_path().string();
    2816 
    28172815            // We call script->Run because it is the only way to
    28182816            // catch exceptions.
Note: See TracChangeset for help on using the changeset viewer.