<?php
class IS_JRR extends Struct // Join Request Reply - send one of these back to LFS in response to a join request
{
const PACK = 'CCxCCCxx';
const UNPACK = 'CSize/CType/CReqI/CPLID/CUCID/CJRRAction/xSp2/xSp3';
protected $Size = 16; # 16
protected $Type = ISP_JRR; # ISP_JRR
public $ReqI; # 0
public $PLID; # ZERO when this is a reply to a join request - SET to move a car
public $UCID; # set when this is a reply to a join request - ignored when moving a car
public $JRRAction; # 1 - allow / 0 - reject (should send message to user)
public $Sp2;
public $Sp3;
public $StartPos; // 0 : use default start point / Flags = 0x80 : set start point
public function pack() {
if ($this->StartPos == null)
$this->StartPos = new ObjectInfo();
return parent::pack() . $this->StartPos->pack();
}
}; function IS_JRR() { return new IS_JRR; }
?>
<?php
public function pack()
{
$return = '';
$packFormat = $this->parsePackFormat();
$propertyNumber = -1;
foreach ($this as $property => $value) {
if (!isset($packFormat[++$propertyNumber])) break;
$pkFnkFormat = $packFormat[$propertyNumber];
if ($pkFnkFormat == 'x') {
$return .= pack('C', 0); # null & 0 are the same thing in Binary (00000000) and Hex (x00), so null == 0.
} elseif (is_array($pkFnkFormat)) {
list($type, $elements) = $pkFnkFormat;
for ($i = 0; $i < $elements; ++$i) {
if(isset($value[$i])){
var_dump($value, $type, $elements, $i, $value[$i]);
$return .= pack($type, $value[$i]);
} else {
$return .= pack("x");
}
}
} else {
$return .= pack($pkFnkFormat, $value);
}
}
return $return;
}
?>
err:clipboard:X11DRV_CLIPBOARD_ExportString Failed to render 000d format
err:clipboard:X11DRV_CLIPBOARD_RenderFormat hWndClipOwner is lost!
err:clipboard:X11DRV_CLIPBOARD_ExportString Failed to render 000d format
wine: Unhandled page fault on read access to 0x00000000 at address 0xf740a596 (thread 002a), starting debugger...
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0xf740a596).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:f740a596 ESP:029ae4e4 EBP:029ae548 EFLAGS:00010283( R- -- I S - - -C)
EAX:00000000 EBX:7dd78000 ECX:00000000 EDX:00000000
ESI:00000000 EDI:00000000
Stack dump:
0x029ae4e4: 00000000 00000000 7dd174b7 00000000
0x029ae4f4: 6f5334a0 029ae548 7dd17188 029ae5b4
0x029ae504: 01cc8258 7dbac029 7db74000 7db74000
0x029ae514: 6f533f20 00000000 7db5e084 6f533f2c
0x029ae524: 6f53f8f0 0000018f 7378e500 7db74000
0x029ae534: 6f533f20 7dd1715b 7dd78000 7dd17150
000c: sel=0067 base=00000000 limit=00000000 32-bit r-x
Backtrace:
=>0 0xf740a596 in libc.so.6 (+0x83596) (0x029ae548)
1 0x7dd174b7 in winex11 (+0x174b6) (0x029ae548)
2 0x7dd15874 in winex11 (+0x15873) (0x029ae5f8)
3 0x7dd1cbc6 in winex11 (+0x1cbc5) (0x029ae738)
4 0x7dd1d309 in winex11 (+0x1d308) (0x029ae768)
5 0x7eb4f9c1 in user32 (+0x8f9c0) (0x029ae7c8)
6 0x7eb16997 in user32 (+0x56996) (0x029ae938)
7 0x7eb17e85 MsgWaitForMultipleObjectsEx+0x54() in user32 (0x029ae988)
8 0x7dd13e8a in winex11 (+0x13e89) (0x029ae9d8)
9 0x7bc76830 call_thread_func_wrapper+0xb() in ntdll (0x029ae9f8)
10 0x7bc7965f call_thread_func+0xce() in ntdll (0x029aeae8)
11 0x7bc7680e RtlRaiseException+0x21() in ntdll (0x029aeb08)
12 0x7bc7f99f in ntdll (+0x6f99e) (0x029af358)
13 0xf753bf16 start_thread+0xd5() in libpthread.so.0 (0x029af428)
14 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
15 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
16 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
17 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
18 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
19 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
20 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
21 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
22 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
23 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
24 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
25 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
26 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
27 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
28 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
29 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
30 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
31 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
32 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
33 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
34 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
35 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
36 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
37 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
38 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
39 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
40 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
41 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
42 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
43 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
44 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
45 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
46 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
47 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
48 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
49 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
50 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
51 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
52 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
53 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
54 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
55 0xf74729fe __clone+0x5d() in libc.so.6 (0x00000000)
....