while (*socket_types[i] != '\n') {
if (is_abbrev(apply_types[i], arg)) {
if(socket_types[i]) { /* This is the line causing the bug*/
apply = i;
break;
}
i++;
}
I'm currently developing a socketing system for my Green Lantern Mud and plan to release it to the public for stock tbamud/circlemud codebases. I'm almost done, expect I'm running into a small bug. When the modifier modifies the weapon/armor instead of setting the correct bit location it sets it to none. Example:
Right way: +10 Max Hit
The Way I'm getting: +10 None
I know the exact line that is causing the bug, but I have spent hours and cannot fix it. I have pasted the code below. The line I believe that is causing the bug is line 10. Lines 8-15 should be getting the modifier object's bit location(MAX_HIT) and making sure that the weapon/armor's bit location is the same.
Hopefully, a fresh pair of eyes or someone can help me sort this little bug out.