aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala
diff options
context:
space:
mode:
authorChick Markley2018-08-17 12:24:21 -0700
committerAdam Izraelevitz2018-08-17 12:24:21 -0700
commit2c299f4611ebf49ff8be3dc001d1aca0bdfd1427 (patch)
treef722c0b846191a46acc50c0c27be53d0be732a3b /src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala
parent3fdc1577865dfaba4c40e5eee4412a39b732618f (diff)
Binding support (#854)
- Fixed edge case file name that starts with . and has no suffix
Diffstat (limited to 'src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala')
-rw-r--r--src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala b/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala
index a5ba22dd..52022f87 100644
--- a/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala
+++ b/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala
@@ -31,6 +31,8 @@ case class LoadMemoryAnnotation(
throw new Exception(s"empty filename not allowed in LoadMemoryAnnotation")
case name :: Nil =>
(name, "")
+ case "" :: name :: Nil => // this case handles a filename that begins with dot and has no suffix
+ ("." + name, "")
case other =>
(other.reverse.tail.reverse.mkString("."), "." + other.last)
}