summaryrefslogtreecommitdiff
path: root/src/buffer.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-11-30 22:17:22 +0000
committerChristian Pointner <equinox@anytun.org>2008-11-30 22:17:22 +0000
commit750b3dae7d510b08a5fecc606d72ee0c71611085 (patch)
treea7f6c948a8ea198ffbc56232c3df7d1899567524 /src/buffer.cpp
parentsome vc++ files (whatever they do???) (diff)
fixed stream >> u_int8_t issue
added win32 directory and a empty tunDevice.cpp
Diffstat (limited to 'src/buffer.cpp')
-rw-r--r--src/buffer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer.cpp b/src/buffer.cpp
index 7a05ce2..5b1c03d 100644
--- a/src/buffer.cpp
+++ b/src/buffer.cpp
@@ -86,10 +86,10 @@ Buffer::Buffer(std::string hex_data, bool allow_realloc) : length_(hex_data.size
for(u_int32_t i=0; i<length_; ++i)
{
- u_int8_t tmp;
+ u_int32_t tmp;
std::istringstream ss(std::string(hex_data.c_str(), i*2, 2));
if(!(ss >> std::hex >> tmp)) tmp = 0;
- buf_[i] = tmp;
+ buf_[i] = static_cast<u_int8_t>(tmp);
}
}