fix off by one in call to symbolize, and avoid nulls
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ void printBytes(const char* bytes) {
|
||||
#define MAX_STR_LEN 3
|
||||
|
||||
TEST(Runlength, EncodeDecode) {
|
||||
char* original = DeepState_CStr(MAX_STR_LEN);
|
||||
char* original = DeepState_CStrUpToLen(MAX_STR_LEN);
|
||||
char* encoded = encode(original);
|
||||
char* roundtrip = decode(encoded);
|
||||
if (!(strncmp(roundtrip, original, MAX_STR_LEN) == 0)) {
|
||||
|
||||
Reference in New Issue
Block a user