Rules of markers usage

Post here any topics that related to Enigma Protector, its functionality, your misunderstanding, offers to improvements etc etc etc
Post Reply
samsonite131
Posts: 30
Joined: Tue Oct 15, 2013 10:35 pm

Rules of markers usage

Post by samsonite131 »

I want to protect an entire C/C++ function with a single EP_Marker("reg_crypt_begin1") and EP_Marker("reg_crypt_end1").

However, I read in the docs:
Rules of markers usage
for C and C++ users: the return; keyword can't be placed inside the marker.
I have a problem with this rule. My function is large. It has many return points.

Such as:

Code: Select all

if(!condition1) {
 return 0;
}
else if(!condition2) {
 return 0;
}
etc...
Of course the logic can be much more complex.

Splitting it up would be messy and cumbersome. Why can't markers handle "return"?
Will my program crash if I do a "return 0" inside a marked section?
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: Rules of markers usage

Post by Enigma »

Hi samsonite131,

Yes, there is a set of rules for markers how they could be used.

But, your particular example has to work well anyway. returns in the C++ code do not damage the workability of the protected file.
Post Reply