Changeset 14780 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 28, 2008 2:36:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HardDiskFormatImpl.cpp
r14772 r14780 95 95 dt = DataType_Int32; 96 96 /* If there is a default value get them in the right format */ 97 if (pa->pDefaultValue) 98 defaultValue = 99 Utf8StrFmt ("%d", pa->pDefaultValue->Integer.u64); 97 if (pa->pszDefaultValue) 98 defaultValue = pa->pszDefaultValue; 100 99 break; 101 100 } … … 104 103 dt = DataType_Int8; 105 104 /* If there is a default value get them in the right format */ 106 if (pa->p DefaultValue)105 if (pa->pszDefaultValue) 107 106 { 108 /* Copy the bytes over */ 109 defaultValue.alloc (pa->pDefaultValue->Bytes.cb + 1); 110 memcpy (defaultValue.mutableRaw(), pa->pDefaultValue->Bytes.pv, 111 pa->pDefaultValue->Bytes.cb); 112 defaultValue.mutableRaw() [defaultValue.length()] = 0; 107 /* Copy the bytes over - treated simply as a string */ 108 defaultValue = pa->pszDefaultValue; 113 109 flags |= DataFlags_Array; 114 110 } … … 119 115 dt = DataType_String; 120 116 /* If there is a default value get them in the right format */ 121 if (pa->p DefaultValue)122 defaultValue = pa->p DefaultValue->String.psz;117 if (pa->pszDefaultValue) 118 defaultValue = pa->pszDefaultValue; 123 119 break; 124 120 }
Note:
See TracChangeset
for help on using the changeset viewer.