Giter Site home page Giter Site logo

[Bug] Bug in pattern leaves ImHex in corrupted state, program reload required, no pattern reload (with corrected pattern) can fix this. about imhex HOT 2 CLOSED

qknight avatar qknight commented on June 17, 2024
[Bug] Bug in pattern leaves ImHex in corrupted state, program reload required, no pattern reload (with corrected pattern) can fix this.

from imhex.

Comments (2)

jumanji144 avatar jumanji144 commented on June 17, 2024

Can you try on the newest imhex version?

from imhex.

qknight avatar qknight commented on June 17, 2024

I've created this in ImHex v.1.33.2:

struct ImportsStructure {
	if (parent.importsDirectoryTable[std::core::array_index()].lookupTableRVA > 0) {
		ImportsLookup lookupTable[while(std::mem::read_unsigned($, wordsize()) != 0)] @ parent.importsDirectoryTable[std::core::array_index()].lookupTableRVA - relativeVirtualDifference();
	}
	if (parent.importsDirectoryTable[std::core::array_index()].addressTableRVA > 0) {
		ImportsAddress addressTable[while(std::mem::read_unsigned($, wordsize()) != 0)] @ parent.importsDirectoryTable[std::core::array_index()].addressTableRVA - relativeVirtualDifference();
	}
+       for (u8 i = 0, i < 10, i = i + 1) { // sizeof(importsSection)
+           std::print("fooooooooooooo");
+       }
	if (parent.importsDirectoryTable[std::core::array_index()].dllNameRVA > 0) {
		char dllName[] @ parent.importsDirectoryTable[std::core::array_index()].dllNameRVA - relativeVirtualDifference() [[format("formatNullTerminatedString")]];
	}
} [[inline]];

And it produced this error:

E: error: Invalid struct member definition.
E:   -->   in <Source Code>:447:8
E: 447 |        for (u8 i = 0, i < 10,
E:               ^^^
E: error: Invalid struct member definition.
E:   -->   in <Source Code>:447:12
E: 447 |        for (u8 i = 0, i < 10, i =
E:                   ^
E: error: Expected ';' at end of statement, got Separator (,).
E:   -->   in <Source Code>:447:20
E: 447 |        for (u8 i = 0, i < 10, i = i + 1)
E:                           ^
E: error: Invalid struct member definition.
E:   -->   in <Source Code>:447:21
E: 447 |       for (u8 i = 0, i < 10, i = i + 1) {
E:                           ^
E: error: Type i has not been declared yet.
E:   -->   in <Source Code>:447:23
E: 447 |     for (u8 i = 0, i < 10, i = i + 1) { 
E:                           ^

E: If this type is being declared further down in the code, consider forward declaring it with 'using i;'.
E: error: Expected ';' at end of statement, got Operator (<).
E:   -->   in <Source Code>:447:23
E: 447 |     for (u8 i = 0, i < 10, i = i + 1) { 
E:                           ^
E: error: Invalid struct member definition.
E:   -->   in <Source Code>:447:25
E: 447 |   for (u8 i = 0, i < 10, i = i + 1) { 
E:                           ^
E: error: Invalid struct member definition.
E:   -->   in <Source Code>:447:27
E: 447 |  for (u8 i = 0, i < 10, i = i + 1) { 
E:                            ^^
E: error: Invalid struct member definition.
E:   -->   in <Source Code>:447:29
E: 447 |  for (u8 i = 0, i < 10, i = i + 1) { 
E:                              ^
E: error: Expected ';' at end of statement, got Separator ()).
E:   -->   in <Source Code>:447:39
E: 447 |  0, i < 10, i = i + 1) { 
E:                            ^
E: error: Invalid struct member definition.
E:   -->   in <Source Code>:447:40
E: 447 |  0, i < 10, i = i + 1) { 
E:                             ^
E: error: Invalid struct member definition.
E:   -->   in <Source Code>:447:42
E: 447 |  i < 10, i = i + 1) { 
E:                            ^
E: error: Expected ';' at end of statement, got Keyword (if).
E:   -->   in <Source Code>:449:9
E: 449 |         }
E:               ^
I: Evaluation took 0.0303644s

From which ImHex recovers once the lines are removed and the pehex is reevaluated. Btw: I only installed this older version because I installed using choco. Thanks for your time!

from imhex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.