fix: don't use mb->idx for the in-rambuffer address

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>