Stock Bug: IBT abort /a with body
- zusuk
-
Topic Author
- Offline
- Elite Member
-
- LuminariMUD Developer
Less
More
5 years 7 months ago #7596
by zusuk
Website
www.luminariMUD.com
Main Game Port
luminariMUD.com:4100
Stock Bug: IBT abort /a with body was created by zusuk
User types:
bug submit my bug
Then:
types at least a character of input, presses return
then decides he/she does not want to submit this bug, so types:
/a
Result:
The bug submission still gets saved to the list
The problem appears to be that because the entry is not an empty 'body' it is not getting cleaned up.
Solution:
Looking for confirmation on the proper way to handle this, this is what I did:
bug submit my bug
Then:
types at least a character of input, presses return
then decides he/she does not want to submit this bug, so types:
/a
Result:
The bug submission still gets saved to the list
The problem appears to be that because the entry is not an empty 'body' it is not getting cleaned up.
Solution:
Looking for confirmation on the proper way to handle this, this is what I did:
/* original */
/*
void clean_ibt_list(int mode) {
IBT_DATA *ibtData = get_first_ibt(mode), *ibtTemp;
while (ibtData) {
ibtTemp = ibtData;
ibtData = ibtData->next;
if (!ibtTemp->body || !*ibtTemp->body) {
free_ibt(mode, ibtTemp);
}
}
}
*/
/* trying this out -zusuk */
void clean_ibt_list(int mode) {
IBT_DATA *ibtData = get_last_ibt(mode);
if (ibtData)
free_ibt(mode, ibtData);
}
Website
www.luminariMUD.com
Main Game Port
luminariMUD.com:4100
Please Log in or Create an account to join the conversation.
Time to create page: 0.078 seconds