Index: /trunk/src/VBox/Main/HardDiskFormatImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/HardDiskFormatImpl.cpp	(revision 13727)
+++ /trunk/src/VBox/Main/HardDiskFormatImpl.cpp	(revision 13728)
@@ -174,6 +174,13 @@
     CheckComRCReturnRC (autoCaller.rc());
 
-    /* this is const, no need to lock */
-    *aCaps = mData.capabilities;
+    /* mData.capabilities is const, no need to lock */
+
+    /// @todo add COMGETTER(ExtendedCapabilities) when we reach the 32 bit
+    /// limit (or make the argument ULONG64 after checking that COM is capable
+    /// of defining enums (used to represent bit flags) that contain 64-bit
+    /// values)
+    ComAssertRet (mData.capabilities == ((ULONG) mData.capabilities), E_FAIL);
+
+    *aCaps = (ULONG) mData.capabilities;
 
     return S_OK;
