diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-08-21 18:22:19 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-08-21 18:22:19 +0200 |
| commit | f4711674144923ba14de51af4d1c9e108deec4fc (patch) | |
| tree | 9df2a32a873d691c015df5d1849c5bb6b9c02230 /webAO | |
| parent | f8b87e949339e170f280549ddea5876f357e32f0 (diff) | |
handle out of range char ids a little better
Diffstat (limited to 'webAO')
| -rw-r--r-- | webAO/client.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/webAO/client.ts b/webAO/client.ts index 5cee9bf..94b80c1 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -773,7 +773,7 @@ class Client extends EventEmitter { let char_chatbox = "default"; let char_muted = false; - if (this.chars[char_id].name !== char_name) { + if (char_id < this.char_list_length && this.chars[char_id].name !== char_name) { console.info( `${this.chars[char_id].name} is iniediting to ${char_name}` ); |
