summaryrefslogtreecommitdiffhomepage
path: root/program.c
diff options
context:
space:
mode:
Diffstat (limited to 'program.c')
-rw-r--r--program.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/program.c b/program.c
index bfe50bc..57252f8 100644
--- a/program.c
+++ b/program.c
@@ -100,14 +100,10 @@ uc_program_function_load(uc_program_t *prog, size_t id)
size_t
uc_program_function_srcpos(uc_function_t *fn, size_t off)
{
- size_t pos;
-
if (!fn)
return 0;
- pos = uc_chunk_debug_get_srcpos(&fn->chunk, off);
-
- return pos ? fn->srcpos + pos : 0;
+ return fn->srcpos + uc_chunk_debug_get_srcpos(&fn->chunk, off);
}
void