Fix a critical error in gs_string_replace()

A merge conflict was not properly resolved in a previous commit, which left the
call to g_string_erase() with the wrong sign.