Use %lx for DWORD.

GetLastError() returns DWORD, not C-String.
pull/1/head
Tatsuhiro Tsujikawa 2010-12-19 00:03:45 +09:00
parent 3cf156240b
commit e818f9c8a5
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ void AbstractDiskWriter::truncate(uint64_t length)
HANDLE handle = LongToHandle(_get_osfhandle(fd_));
seek(length);
if(SetEndOfFile(handle) == 0) {
throw DL_ABORT_EX2(fmt("SetEndOfFile failed. cause: %s",
throw DL_ABORT_EX2(fmt("SetEndOfFile failed. cause: %lx",
GetLastError()),
error_code::FILE_IO_ERROR);
}