Jump to content

Illegal read error - BG1EE w/Sod - resolved


Recommended Posts

I am working on one of my mods which is cross-compatible with BGEE and BG2EE and running into an annoing issue:

I get an illegal 2-byte read error when I run the below on a clean install of BGEE w SoD (modmerge already done)

COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~		
  READ_LONG   0x08 name
  READ_SHORT 0x98 ~proj~

The problem occurs when it tries to read 0x98 from: cddetect.spl.    I checked the file in NI, and it appears that this was intended to be an ITM file as it has that signature so, I am fairly positive the file itself is the culprit, but I haven't been able to find a way to work around it.  Would appreciate any advice here.  

Edited by Daeros_Trollkiller
resolved
Link to comment
1 hour ago, qwerty1234567 said:

Check SOURCE_SIZE or signature.

Thank you for the quick response!  Would the check look something like this?

Answered my own question, the below does indeed work.  Thank you!

COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~
  READ_ASCII 0x0 sg (4) //Signature
  PATCH_IF (~%sg%~ STRING_EQUAL_CASE ~SPL ~ = 1) BEGIN

 

Edited by Daeros_Trollkiller
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...