[FREELDR] Fix 64 bit issues
[reactos.git] / boot / freeldr / freeldr / ntldr / registry.c
index 0c84127..6b826bc 100644 (file)
@@ -204,7 +204,7 @@ GetNextPathElement(
         RemainingPath->Length -= sizeof(WCHAR);
     }
 
-    NextElement->Length = (RemainingPath->Buffer - NextElement->Buffer) * sizeof(WCHAR);
+    NextElement->Length = (USHORT)(RemainingPath->Buffer - NextElement->Buffer) * sizeof(WCHAR);
     NextElement->MaximumLength = NextElement->Length;
 
     /* Check if the path element ended with a path separator */