From c340f572074d7f9a3588958a1970b47cd4bb40ac Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 25 Feb 2020 14:27:46 +0100 Subject: [PATCH] Xml_node: skip leading whitespace in with_raw_node This patch makes the 'with_raw_node' method more useful in situations where content of an Xml_node is fed into an Xml_generator, i.e., the rules report/rom mechanism of the window layouter. --- repos/base/include/util/xml_node.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/base/include/util/xml_node.h b/repos/base/include/util/xml_node.h index 6ae83a8b6e..ea74233af9 100644 --- a/repos/base/include/util/xml_node.h +++ b/repos/base/include/util/xml_node.h @@ -760,7 +760,8 @@ class Genode::Xml_node template void with_raw_node(FN const &fn) const { - fn(_addr, _tags.end.next_token().start() - _addr); + char const *start_ptr = _tags.start.token().start(); + fn(start_ptr, _tags.end.next_token().start() - start_ptr); } /**