From ca22aec9d4133ebca75c5504c2c0896e97b92f83 Mon Sep 17 00:00:00 2001
From: Timothy Totten <2010@huri.net>
Date: Mon, 1 Oct 2012 09:50:11 -0700
Subject: [PATCH] Added 'x' to pack.

---
 src/core/Buf.pm |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/core/Buf.pm b/src/core/Buf.pm
index 1e47609..ec3dd49 100644
--- a/src/core/Buf.pm
+++ b/src/core/Buf.pm
@@ -239,6 +239,15 @@ multi sub pack(Str $template, *@items) {
                 }
                 @bytes.push: map { :16($_) }, $hexstring.comb(/../);
             }
+            when 'x' {
+                if $amount eq '*' {
+                    $amount = 0;
+                }
+                elsif $amount eq '' {
+                    $amount = 1;
+                }
+                @bytes.push: 0x00 xx $amount;
+            }
             when 'C' {
                 my $number = shift(@items);
                 @bytes.push: $number % 0x100;
-- 
1.7.10.4

