Skip to content

Commit 6d97cea

Browse files
committed
bugfix: chinese disorderly code of displayname
1 parent 311a8d1 commit 6d97cea

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

AppResign/AppResign/main.swift

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,27 @@ func Usage() {
3030
exit(1)
3131
}
3232

33+
// deprecated
34+
//func raw_input(_ prompt: String = "> ") -> String {
35+
// print(prompt, terminator:"")
36+
// var input: String = ""
37+
//
38+
// while true {
39+
// let c = Character(UnicodeScalar(UInt32(fgetc(stdin)))!)
40+
// if c == "\n" {
41+
// return input
42+
// } else {
43+
// input.append(c)
44+
// }
45+
// }
46+
//}
47+
3348
func raw_input(_ prompt: String = "> ") -> String {
3449
print(prompt, terminator:"")
35-
var input: String = ""
36-
37-
while true {
38-
let c = Character(UnicodeScalar(UInt32(fgetc(stdin)))!)
39-
if c == "\n" {
40-
return input
41-
} else {
42-
input.append(c)
43-
}
44-
}
50+
return readLine(strippingNewline: true) ?? ""
4551
}
4652

53+
4754
func mainRoutine(_ input: String, output: String, certificate: String, provProfile: String, bundleId: String, displayName: String) {
4855
let support = ["deb", "ipa", "app", "xcarchive"]
4956
if support.contains(input.pathExtension) {

0 commit comments

Comments
 (0)