Skip to content
Snippets Groups Projects
Commit 8ef5e6c9 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Address "TypeError: buf is null" reported by Melkor

parent 3005a5a9
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -217,7 +217,7 @@ BinkP.prototype.crypt = {
var ret = '';
var ch;
for (i=0; i<buf.length; i++) {
for (i=0; buf !== null && i<buf.length; i++) {
ch = ascii(ascii(buf[i]) ^ this.decrypt_byte(keys));
ret += ch;
this.update_keys(keys, ch);
......@@ -229,7 +229,7 @@ BinkP.prototype.crypt = {
var i;
var ret = '';
for (i=0; i<buf.length; i++) {
for (i=0; buf !== null && i<buf.length; i++) {
t = this.decrypt_byte(keys);
this.update_keys(keys, buf[i]);
ret += ascii(ascii(buf[i]) ^ t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment