/* "symbols" : The symbols table; creating stock of reserved words */
/* */
/* Part of Inform 6.35 */
-/* copyright (c) Graham Nelson 1993 - 2020 */
+/* copyright (c) Graham Nelson 1993 - 2021 */
/* */
/* Inform is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
{
df_function_t *func;
int count;
+ int beg;
+ int end;
if (!track_unused_routines)
compiler_error("DF: df_stripped_offset_for_code_offset called, but function references have not been mapped");
/* Do a binary search. Maintain beg <= res < end, where res is the
function containing the desired address. */
- int beg = 0;
- int end = df_functions_sorted_count;
+ beg = 0;
+ end = df_functions_sorted_count;
/* Set stripped flag until we decide on a non-stripped function. */
*stripped = TRUE;
while (1) {
+ int new;
if (beg >= end) {
error("DF: offset_for_code_offset: Could not locate address.");
return 0;
*stripped = FALSE;
return func->newaddress + (offset - func->address);
}
- int new = (beg + end) / 2;
+ new = (beg + end) / 2;
if (new <= beg || new >= end)
compiler_error("DF: binary search went off the rails");