It is highly surprising that asking the gpgmepp code for 31 bytes zbase32 code that you get in return 30 bytes zbase32 and a nullbyte.
It is even more surprising that if you ask the gpgmepp code for 40 bytes of zbase32 code that you get in return 30 bytes zbase32 code and 10 nullbytes.
This is 1) a bug in gpgmepp that it preserves the c-string nullbyte and 2) a bug that numbers other than 30 is anything but an error.