Commits

Daniel Green  committed b1c34b7

Issue #227. build error libphobos/core/sys/windows/stacktrace.d.

  • Participants
  • Parent commits dda1c10

Comments (0)

Files changed (1)

File d/druntime/core/sys/windows/stacktrace.d

         auto symbolSize = IMAGEHLP_SYMBOL64.sizeof + MAX_NAMELEN;
         auto symbol     = cast(IMAGEHLP_SYMBOL64*) calloc( symbolSize, 1 );
 
-        symbol.SizeOfStruct  = symbolSize;
+        static assert((IMAGEHLP_SYMBOL64.sizeof + MAX_NAMELEN) < uint.max, "symbolSize should never exceed uint.max");
+        
+        symbol.SizeOfStruct  = cast(DWORD) symbolSize;
         symbol.MaxNameLength = MAX_NAMELEN;
 
         IMAGEHLP_LINE64 line;