Browse Source

Fix silly one-liner bug... retag time.

Adam Ierymenko 9 years ago
parent
commit
901e2fd692
1 changed files with 3 additions and 3 deletions
  1. 3 3
      node/Dictionary.hpp

+ 3 - 3
node/Dictionary.hpp

@@ -66,10 +66,10 @@ public:
 
 	Dictionary(const char *s,unsigned int len)
 	{
-		if (len > C)
-			len = C;
+		if (len > (C-1))
+			len = C-1;
 		memcpy(_d,s,len);
-		_d[len-1] = (char)0;
+		_d[len] = (char)0;
 	}
 
 	Dictionary(const Dictionary &d)