In this image, the top bone is rotated by 45 degrees, but the model is deformed like there was a rotation of 90 degrees. This also happens for translation and scaling.
For each vertex, the sum of the weights is one.
What am I missing? The code for skinning is inspired by the second piece of code here: Rigged mesh
Thanks