aboutsummaryrefslogtreecommitdiff
path: root/src/client/joystick_controller.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-05-25 19:07:49 +0200
committersfan5 <sfan5@live.de>2022-05-29 14:00:19 +0200
commitda71e86633d0b27cd02d7aac9fdac625d141ca13 (patch)
tree5a4f4c1939e2a4f5ee7c8e34932aa34fb4792be4 /src/client/joystick_controller.cpp
parentbccaf5fc2d11c31615d64b9bca91f908d06b7044 (diff)
downloadminetest-da71e86633d0b27cd02d7aac9fdac625d141ca13.tar.gz
minetest-da71e86633d0b27cd02d7aac9fdac625d141ca13.tar.bz2
minetest-da71e86633d0b27cd02d7aac9fdac625d141ca13.zip
Protect a few more settings from being set from mods
Of those settings main_menu_script has concrete security impact, the rest are added out of abundance of caution.
Diffstat (limited to 'src/client/joystick_controller.cpp')
0 files changed, 0 insertions, 0 deletions
132'>132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "nodemetadata.h"
#include "utility.h"
#include "mapnode.h"
#include "exceptions.h"
#include "inventory.h"
#include <sstream>
#include "content_mapnode.h"

/*
	NodeMetadata
*/

core::map<u16, NodeMetadata::Factory> NodeMetadata::m_types;

NodeMetadata::NodeMetadata()
{
}

NodeMetadata::~NodeMetadata()
{
}

NodeMetadata* NodeMetadata::deSerialize(std::istream &is)
{
	// Read id
	u8 buf[2];
	is.read((char*)buf, 2);
	s16 id = readS16(buf);
	
	// Read data
	std::string data = deSerializeString(is);
	
	// Find factory function
	core::map<u16, Factory>::Node *n;
	n = m_types.find(id);