fix crash when torrent creation fails because an integer was being treated as a string

This commit is contained in:
Mitchell Livingston 2008-03-28 15:19:07 +00:00
parent dbcbd99bf0
commit 70845fe104
2 changed files with 3 additions and 3 deletions

View File

@ -335,10 +335,10 @@
[alert setAlertStyle: NSWarningAlertStyle];
if (fInfo->result == TR_MAKEMETA_IO_READ)
[alert setInformativeText: [NSString stringWithFormat: NSLocalizedString(@"Could not read \"%s\": %s",
[alert setInformativeText: [NSString stringWithFormat: NSLocalizedString(@"Could not read \"%s\" (%d)",
"Create torrent -> failed -> warning"), fInfo->errfile, fInfo->my_errno]];
else if (fInfo->result == TR_MAKEMETA_IO_WRITE)
[alert setInformativeText: [NSString stringWithFormat: NSLocalizedString(@"Could not write \"%s\": %s",
[alert setInformativeText: [NSString stringWithFormat: NSLocalizedString(@"Could not write \"%s\" (%d)",
"Create torrent -> failed -> warning"), fInfo->errfile, fInfo->my_errno]];
else; //invalid url should have been caught before creating

View File

@ -58,7 +58,7 @@
{
if (fShow)
{
NSRect lineBorderRect = NSMakeRect(rect.origin.x, NSMaxY([self bounds]) - 1.0, rect.size.width, 1.0);
NSRect lineBorderRect = NSMakeRect(rect.origin.x, [self bounds].size.height - 1.0, rect.size.width, 1.0);
if (NSIntersectsRect(lineBorderRect, rect))
{
[[NSColor whiteColor] set];