[NEW] Protect SCNotification structure data from the modification of plugins.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@226 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2008-06-12 14:37:08 +00:00
parent b07c4db28e
commit f7397ed5ec

View File

@ -95,7 +95,10 @@ public:
void notify(SCNotification *notification) {
for (size_t i = 0 ; i < _pluginInfos.size() ; i++)
{
_pluginInfos[i]->_pBeNotified(notification);
// To avoid the plugin change the data in SCNotification
// Each notification to pass to a plugin is a copy of SCNotification instance
SCNotification scNotif = *notification;
_pluginInfos[i]->_pBeNotified(&scNotif);
}
};