X-Git-Url: http://git.tdb.fi/?p=libs%2Fgui.git;a=blobdiff_plain;f=source%2Finput%2Flinux%2Fgamecontroller.cpp;h=d5fed3baba92783c7e7e347bf0fd2fced4723100;hp=bf690494a91c76d08d71f10d2ad8a425cf56a2a8;hb=c430f2d7498e9c2daa515ee9aba3a95257e5e999;hpb=5b06f17bd09b4aaaa295f167566ca52f70db5c27 diff --git a/source/input/linux/gamecontroller.cpp b/source/input/linux/gamecontroller.cpp index bf69049..d5fed3b 100644 --- a/source/input/linux/gamecontroller.cpp +++ b/source/input/linux/gamecontroller.cpp @@ -59,7 +59,7 @@ JsDevice::JsDevice(const string &fn) string JsDevice::get_name() const { - char buf[128]; + char buf[128] = { 0 }; int ret = ioctl(*handle, JSIOCGNAME(sizeof(buf)), buf); if(ret<0) throw system_error("ioctl(JSIOCGNAME)");