msgb: make msgb_get() finally work as expected
diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index 19e4a3d..644a639 100644
--- a/include/osmocom/core/msgb.h
+++ b/include/osmocom/core/msgb.h
@@ -224,7 +224,7 @@
  */
 static inline unsigned char *msgb_get(struct msgb *msgb, unsigned int len)
 {
-	unsigned char *tmp = msgb->data - len;
+	unsigned char *tmp = msgb->tail - len;
 	if (msgb_length(msgb) < len)
 		MSGB_ABORT(msgb, "msgb too small to get %u (len %u)\n",
 			   len, msgb_length(msgb));