fix generate password function
This commit is contained in:
		| @@ -19,11 +19,11 @@ void generate_password(char* password) | |||||||
| { | { | ||||||
| 	srand(time(NULL)); | 	srand(time(NULL)); | ||||||
| 	char characters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~!@#$%^&*()_-+={[}]|:;<,>.?"; | 	char characters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~!@#$%^&*()_-+={[}]|:;<,>.?"; | ||||||
| 	for (int i = 0; i < 15; i++) | 	for (int i = 0; i < MAX_STRING_SIZE; i++) | ||||||
| 	{ | 	{ | ||||||
| 		password[i] = characters[rand() % (sizeof(characters) - 1)]; | 		password[i] = characters[rand() % (sizeof(characters) - 1)]; | ||||||
| 	} | 	} | ||||||
| 	password[15] = '\0'; | 	password[MAX_STRING_SIZE - 1] = '\0'; | ||||||
| } | } | ||||||
|  |  | ||||||
| bool save_buffer_to_file(Buffer* buffer) | bool save_buffer_to_file(Buffer* buffer) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Nikola Petrov
					Nikola Petrov