Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuleModeler crashes when a java class name without package is used in an Assignment #744

Open
jvanek opened this issue May 13, 2016 · 0 comments

Comments

@jvanek
Copy link

jvanek commented May 13, 2016

If a rule is in a d2w.user file wher an Assignment is done to a java class without package (ie without any . in its name) the RuleModeler crashes.

The fix is to change the line 139 in Assigment.m from:

unsigned lastDotIndex = [aClassName rangeOfString:@"." options:NSBackwardsSearch].location;

to

NSInteger lastDotIndex = [aClassName rangeOfString:@"." options:NSBackwardsSearch].location;

as the unsigned int is out of limits of a NSInteger, the test below NSNotFound doesn't match and the code crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant