Changeset 93085 in vbox for trunk/src/VBox/Main/src-server/UnattendedScript.cpp
- Timestamp:
- Dec 27, 2021 4:55:00 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedScript.cpp
r91502 r93085 59 59 static const char s_szPrefixCond[] = "@@VBOX_COND_"; 60 60 static const char s_szPrefixCondEnd[] = "@@VBOX_COND_END@@"; 61 static const char s_szPrefixSplitter[] = "@@VBOX_SPLITTER"; 61 62 62 63 struct … … 128 129 if ( pszPlaceholder[cchPlaceholder - 1] != '@' 129 130 || pszPlaceholder[cchPlaceholder - 2] != '@' 130 || ( strncmp(pszPlaceholder, s_szPrefixInsert, sizeof(s_szPrefixInsert) - 1) != 0 131 && strncmp(pszPlaceholder, s_szPrefixCond, sizeof(s_szPrefixCond) - 1) != 0 ) ) 131 || ( strncmp(pszPlaceholder, s_szPrefixInsert, sizeof(s_szPrefixInsert) - 1) != 0 132 && strncmp(pszPlaceholder, s_szPrefixCond, sizeof(s_szPrefixCond) - 1) != 0 133 && strncmp(pszPlaceholder, s_szPrefixSplitter, sizeof(s_szPrefixSplitter) - 1) != 0 ) ) 132 134 { 133 135 hrc = mpSetError->setError(E_FAIL, tr("Malformed template placeholder '%.*s'"), … … 188 190 * one from the condition. 189 191 */ 190 else 192 else if (strncmp(pszPlaceholder, s_szPrefixSplitter, sizeof(s_szPrefixSplitter) - 1) != 0) 191 193 { 192 194 Assert(strncmp(pszPlaceholder, s_szPrefixCond, sizeof(s_szPrefixCond) - 1) == 0); … … 208 210 offPlaceholder, offPlaceholder); 209 211 break; 212 } 213 } 214 /* 215 * @@VBOX_SPLITTER_START/END[filename]@@: Ignored in this pass. 216 */ 217 else 218 { 219 if (fOutputting) 220 { 221 try 222 { 223 rStrDst.append(pszPlaceholder, cchPlaceholder); 224 } 225 catch (std::bad_alloc &) 226 { 227 hrc = E_OUTOFMEMORY; 228 break; 229 } 210 230 } 211 231 }
Note:
See TracChangeset
for help on using the changeset viewer.