[Bps-public-commit] r14486 - in Data-Plist: .

kyoki at bestpractical.com kyoki at bestpractical.com
Thu Jul 24 17:12:15 EDT 2008


Author: kyoki
Date: Thu Jul 24 17:12:14 2008
New Revision: 14486

Modified:
   Data-Plist/   (props changed)
   Data-Plist/lib/Data/Plist/BinaryWriter.pm

Log:
 r30011 at nyx:  kyoki | 2008-07-24 17:12:13 -0400
 fixed small error


Modified: Data-Plist/lib/Data/Plist/BinaryWriter.pm
==============================================================================
--- Data-Plist/lib/Data/Plist/BinaryWriter.pm	(original)
+++ Data-Plist/lib/Data/Plist/BinaryWriter.pm	Thu Jul 24 17:12:14 2008
@@ -508,15 +508,15 @@
 sub bytes {
     my $self = shift;
     my ($int) = @_;
-    if ( $int > 2**24 ) {
+    if ( $int >= 2**24 ) {
         return 4;
 
         # actually refers to 4 bytes
-    } elsif ( $int > 2**16 ) {
+    } elsif ( $int >= 2**16 ) {
         return 3;
 
         # actually refers to 3 bytes
-    } elsif ( $int > 255 ) {
+    } elsif ( $int >= 256 ) {
         return 2;
 
         # I'm sure you see the trend



More information about the Bps-public-commit mailing list