diff --git a/res/res_agi.c b/res/res_agi.c index 5fcfdb8783..f91cb7ca0c 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1619,6 +1619,7 @@ static int handle_dbget(struct ast_channel *chan, AGI *agi, int argc, char **arg do { res = ast_db_get(argv[2], argv[3], buf->str, buf->len); + buf->used = strlen(buf->str); if (buf->used < buf->len - 1) { break; }