The error is due to an undefined program behavior. Apparently the pointer s does not contain a valid address or contains a memory address that was not allocated using the new operator .. Look for the cause in other members of the class where it is set or, conversely, the value s not set.
As for the operator itself, the post-increment operator usually returns a new temporary object, equal to the original one before its change, and changes the original one. That is, his ad looks generally like
T operator ++( int );
or
const T operator ++( int );
As for your String class, if the source string is empty, it does not change, because there are no characters in the string to use the last one as a placeholder character (Another approach is to use the space character as a placeholder).
With that said, the operator may look like this.
String operator ++( int ) { String dsn( *this ); if ( this->length != 0 ) { size_t n = length + 1; char *tmp = new char[ n + 1 ]; std::memcpy( tmp, this->s, this->length ); tmp[ length ] = tmp[ length - 1 ]; tmp[n] = '\0'; delete [] s; this->s = tmp; this->length = n; } return dsn; }