Skip to content

Commit b6cb2ed

Browse files
committed
[CRT] CLI args are char[]* not char[]
1 parent 0dde507 commit b6cb2ed

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

dlls/msvcrt/msvcrt.hexa

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,20 @@ fun _unlock(stub Int32) Void {
208208
tofitaDebugLog("_unlock()\n".utf16())
209209
}
210210

211-
// TODO _acmdln
211+
@dllExport('_acmdln')
212+
var _acmdln SizeOfPointer = _acmdln_stub.ref as! SizeOfPointer // TODO `.address`
213+
var _acmdln_stub ArrayByValue<UInt8, 4> = [
214+
// TODO
215+
// Just "exe\0"
216+
101u8,
217+
120u8,
218+
101u8,
219+
0u8
220+
]
221+
212222
@dllExport('_wcmdln')
213-
var _wcmdln ArrayByValue<UInt16, 4> = [
223+
var _wcmdln SizeOfPointer = _wcmdln_stub.ref as! SizeOfPointer // TODO `.address`
224+
var _wcmdln_stub ArrayByValue<UInt16, 4> = [
214225
// TODO
215226
// Just "exe\0"
216227
101u16,

0 commit comments

Comments
 (0)