Skip to content

Commit 2935b9f

Browse files
committed
Safer way to retrieve character encoding name
Version changed to 16.02.R12
1 parent 2373631 commit 2935b9f

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

lib7z/lib7z.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,12 @@ LIB7ZRC MLRenameItemsInArchive(std::wstring archiveNameW, std::vector<std::wstri
478478
int do_one(unsigned int count, const char * const *names, void *arg) {
479479
std::vector<std::wstring> *arr = (std::vector<std::wstring> *)arg;
480480
std::wstringstream s;
481-
s << iconv_canonicalize(names[0]);
481+
const char *cname = iconv_canonicalize(names[0]);
482+
if (*cname) {
483+
s << iconv_canonicalize(names[0]);
484+
} else {
485+
s << names[0];
486+
}
482487
arr->push_back(s.str());
483488
return 0;
484489
}

m7z.xcodeproj/project.pbxproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -5129,7 +5129,8 @@
51295129
"$(PROJECT_DIR)/m7z",
51305130
"$(PROJECT_DIR)/lib7z",
51315131
);
5132-
MARKETING_VERSION = 16.02.R11;
5132+
MACOSX_DEPLOYMENT_TARGET = 10.13.6;
5133+
MARKETING_VERSION = 16.02.R12;
51335134
OTHER_LDFLAGS = "-all_load";
51345135
PRODUCT_BUNDLE_IDENTIFIER = mpl.m7z;
51355136
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -5156,7 +5157,8 @@
51565157
"$(PROJECT_DIR)/m7z",
51575158
"$(PROJECT_DIR)/lib7z",
51585159
);
5159-
MARKETING_VERSION = 16.02.R11;
5160+
MACOSX_DEPLOYMENT_TARGET = 10.13.6;
5161+
MARKETING_VERSION = 16.02.R12;
51605162
OTHER_LDFLAGS = "-all_load";
51615163
PRODUCT_BUNDLE_IDENTIFIER = mpl.m7z;
51625164
PRODUCT_NAME = "$(TARGET_NAME)";

0 commit comments

Comments
 (0)