BarryServer : Git

All the code for all my projects
// BarryServer : Git / PolymorphicEngine / commit / 29bc27b22410c50fed511599b80ca2077be18f29 / src / main.c

// Related

PolymorphicEngine

Barry Making child file names fixed length 29bc27b (3 years, 5 months ago)
diff --git a/src/main.c b/src/main.c
index 5ffb3bb..5fd73d2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -110,7 +110,7 @@ encrypted_main(int argc, char **argv)
 
 	/* Duplicate file */
 	for (i = NAME_PREFIX_LENGTH; i < sizeof(filename)-1; i++)
-		filename[i] = alpha[rand() % sizeof(alpha)];
+		filename[i] = alpha[rand() % (sizeof(alpha)-1)];
 	copy_file(argv[0], filename);
 	chmod(filename, 0777);