Fixed strbreak(), added Sanji's file natives

This commit is contained in:
David Anderson
2004-04-03 19:50:20 +00:00
parent 82e2cf7741
commit 9441505ab3
2 changed files with 254 additions and 1 deletions

View File

@ -502,7 +502,7 @@ static cell AMX_NATIVE_CALL strbreak(AMX *amx, cell *params) /* 5 param */
int RightMax = params[5];
for (i=0; i<strlen(string); i++) {
if (string[i] == '"') {
if (string[i] == '"' && !quote_flag) {
quote_flag = true;
} else if (string[i] == '"' && quote_flag) {
quote_flag = false;
@ -518,6 +518,8 @@ static cell AMX_NATIVE_CALL strbreak(AMX *amx, cell *params) /* 5 param */
left[left_pos] = hold;
}
left_pos++;
} else {
done_flag = true;
}
} else {
if (right_pos < RightMax && string[i]!='"') {