u32 orig_dest_image_count;
/* Check for sane parameters. */
+ if (export_flags & ~(WIMLIB_EXPORT_FLAG_BOOT |
+ WIMLIB_EXPORT_FLAG_NO_NAMES |
+ WIMLIB_EXPORT_FLAG_NO_DESCRIPTIONS))
+ return WIMLIB_ERR_INVALID_PARAM;
+
if (src_wim == NULL || dest_wim == NULL)
return WIMLIB_ERR_INVALID_PARAM;
/* Determine destination image name and description. */
if (export_flags & WIMLIB_EXPORT_FLAG_NO_NAMES) {
- next_dest_name = NULL;
+ next_dest_name = T("");
} else if (dest_name) {
next_dest_name = dest_name;
} else {
DEBUG("Using name \"%"TS"\"", next_dest_name);
if (export_flags & WIMLIB_EXPORT_FLAG_NO_DESCRIPTIONS) {
- next_dest_description = NULL;
- } if (dest_description) {
+ next_dest_description = T("");
+ } else if (dest_description) {
next_dest_description = dest_description;
} else {
next_dest_description = wimlib_get_image_description(