From ac1882a21a28acc16a78d4b35e73f941a05a2c65 Mon Sep 17 00:00:00 2001 From: hoxovic <9694402+hoxovic@users.noreply.github.com> Date: Tue, 7 Jan 2020 20:29:17 +0100 Subject: [PATCH] Fix issue #303 - forbidden implicit conversion double -> float in generated C# code --- lcmgen/emit_csharp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcmgen/emit_csharp.c b/lcmgen/emit_csharp.c index 0bc3d3b0c..d754cf90d 100644 --- a/lcmgen/emit_csharp.c +++ b/lcmgen/emit_csharp.c @@ -453,7 +453,7 @@ int emit_csharp(lcmgen_t *lcm) } else if (!strcmp(lc->lctypename, "int64_t")) { emit(2, "public const long %s = %sL;", lc->membername, lc->val_str); } else if (!strcmp(lc->lctypename, "float")) { - emit(2, "public const float %s = %s;", lc->membername, lc->val_str); + emit(2, "public const float %s = %sf;", lc->membername, lc->val_str); } else if (!strcmp(lc->lctypename, "double")) { emit(2, "public const double %s = %s;", lc->membername, lc->val_str); } else {