Browse Source

Use %lx for DWORD.

GetLastError() returns DWORD, not C-String.
Tatsuhiro Tsujikawa 15 năm trước cách đây
mục cha
commit
e818f9c8a5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/AbstractDiskWriter.cc

+ 1 - 1
src/AbstractDiskWriter.cc

@@ -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);
   }