Package: frozen-bubble
Version: 2.1.0-2
Severity: normal
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu hardy ubuntu-patch patch

By default the nickname (if none given) is truncated to 10 characters (see sanitize_nick function). However, when creating a LAN server, the prefix "lan-" is added. Thus if the username is longer than 10 (mine is 15) it gets truncated to 10 characters plus the 4 of the server prefix. However, when creating a LAN server, you get an error because the server name is longer than 12 characters.

The attached patch fixes this issue.

This bug has been originally reported on Launchpad:
https://bugs.edge.launchpad.net/ubuntu/+source/frozen-bubble/+bug/96460
--- frozen-bubble	2008-01-07 23:33:35.000000000 +0100
+++ frozen-bubble.patch	2008-01-07 23:39:03.000000000 +0100
@@ -3424,7 +3424,7 @@
 
 sub sanitize_nick {
     my ($nick) = @_;
-    $nick = substr($nick, 0, 10);
+    $nick = substr($nick, 0, 8);
     $nick =~ s/[^a-zA-Z0-9_-]//g;
     return $nick;
 }

Reply via email to