Changeset 3068 in CLRX


Ignore:
Timestamp:
May 17, 2017, 8:16:59 AM (3 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Precise openmode in opening ofstream (add std::ios::trunc).

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/Assembler.cpp

    r3035 r3068  
    26812681        if (formatHandler!=nullptr)
    26822682        {
    2683             std::ofstream ofs(filename, std::ios::binary);
     2683            std::ofstream ofs(filename, std::ios::binary | std::ios::trunc);
    26842684            if (ofs)
    26852685                formatHandler->writeBinary(ofs);
  • CLRadeonExtender/trunk/amdbin/AmdBinGen.cpp

    r3056 r3068  
    19201920        if (!clrxTimestampPath.empty()) // if clrxamdocltstamp set
    19211921        {   // write to
    1922             std::ofstream ofs(clrxTimestampPath.c_str(), std::ios::binary);
     1922            std::ofstream ofs(clrxTimestampPath.c_str(),
     1923                              std::ios::binary | std::ios::trunc);
    19231924            ofs << detectionFileTimestamp << " " << detectedDriverVersion;
    19241925        }
Note: See TracChangeset for help on using the changeset viewer.