ScreenSaver : Clean up the sanitize routine to use the isalnum(..) function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33070 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include <Screen.h>
|
||||
#include <TextControl.h>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
const uint32 kMsgDone = 'done';
|
||||
const uint32 kMsgPasswordTypeChanged = 'pwtp';
|
||||
@@ -139,10 +141,7 @@ PasswordWindow::_SanitizeSalt(const char *password)
|
||||
uint8 i = 0;
|
||||
uint8 j = 0;
|
||||
for (; i < length; i++) {
|
||||
if ((password[i] >= 'A' && password[i] <= 'Z')
|
||||
|| (password[i] >= 'a' && password[i] <= 'z')
|
||||
|| (password[i] >= '0' && password[i] <= '9')
|
||||
|| (password[i] == '.' || password[i] == '/')) {
|
||||
if (isalnum(password[i]) || password[i] == '.' || password[i] == '/') {
|
||||
salt[j] = password[i];
|
||||
j++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user