mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Qt turns edited locations into null-strings
They aren't null pointers after you touched them, so we can't rely on that to choose if we should use put_string or show_utf8. show_utf8 would not print the tag if it only contains a \0 as body. Fixes #440 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									7c3b68e3ae
								
							
						
					
					
						commit
						868827f5ec
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -190,7 +190,7 @@ static void show_location(struct membuffer *b, struct dive *dive) | |||
| 		int len = sprintf(buffer, "  <location "); | ||||
| 
 | ||||
| 		len += format_location(buffer + len, latitude, longitude); | ||||
| 		if (!dive->location) { | ||||
| 		if (!dive->location || dive->location[0] == '\0') { | ||||
| 			memcpy(buffer + len, "/>\n\0", 5); | ||||
| 			put_string(b, buffer); | ||||
| 			return; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue