CryptoPassphrase  Diff

Differences From Artifact [5dd2aa4de5]:

To Artifact [ce1997b342]:


50
51
52
53
54
55
56
57
58


59
60
61
62

63
64
65
66
67
68

69
70
71
72
73
74
75
50
51
52
53
54
55
56


57
58
59
60
61

62
63
64
65
66
67

68
69
70
71
72
73
74
75







-
-
+
+



-
+





-
+







	[_mainViewController release];

	[super dealloc];
}

- (IBAction)done: (id)sender
{
	OFString *name = [self.nameField.text OFObject];
	OFString *lengthStr = [self.lengthField.text OFObject];
	OFString *name = self.nameField.text.OFObject;
	OFString *lengthString = self.lengthField.text.OFObject;
	bool lengthValid = true;
	size_t length;

	if ([name length] == 0) {
	if (name.length == 0) {
		showAlert(self, @"Name missing", @"Please enter a name.");
		return;
	}

	@try {
		length = (size_t)[lengthStr decimalValue];
		length = (size_t)lengthString.decimalValue;

		if (length < 3 || length > 64)
			lengthValid = false;
	} @catch (OFInvalidFormatException *e) {
		lengthValid = false;
	}