Note that at the beginning of the execution of bio_edit(), validating '''*offset''' may require the value of '''*offset''' to change. If so, make sure to correct the offset and then terminate the function before any editing happens returning the default value of key.
An easy way to accomplish this is to store the value of '''*offset''' in a temporary variable (eg. tempOffset) at the start of the function (after the opening while), and check at the end of the loop whether the
value is still the same. If they do not, set done to 1. The loop exits.